Enabling render region and setting render border

I want to enable the render region function and set the render border values from within cycles source code - is that possible?
From what I have found those values come from properties in the blender scene that gets synced, but I have found no way to modify them.
(I’m currently only interested in the rendered mode for the viewport, if that makes a difference)


The Camera class has border_* members that define the render border.

I know about that one, but how do I tell cycles to use render borders? There seems to be a use_borders() in the properties that get passed from blender, but I can’t find out where/if cycles saves it.