pub struct PrivateRegion { /* private fields */ }Expand description
Unique writable region before any native capability escapes.
Implementations§
Source§impl PrivateRegion
impl PrivateRegion
Sourcepub fn allocate(options: RegionOptions) -> Result<Self, RegionError>
pub fn allocate(options: RegionOptions) -> Result<Self, RegionError>
Allocates zeroed anonymous memory with a non-executable library view.
Delegated native authority follows the documented target policy; on Linux, a malicious memfd holder may create a separate executable alias.
Every GuardPolicy is accepted here: guard bands are installed when
a committed batch maps each endpoint’s own active views, so a
GuardPolicy::Require region fails at batch preparation or commit,
not at allocation, when bands cannot install.
Sourcepub fn initialize<R>(&mut self, operation: impl FnOnce(&mut [u8]) -> R) -> R
pub fn initialize<R>(&mut self, operation: impl FnOnce(&mut [u8]) -> R) -> R
Runs scoped initialization over logical bytes only.
Sourcepub fn prepare(self, spec: RegionSpec) -> Result<PreparedRegion, RegionError>
pub fn prepare(self, spec: RegionSpec) -> Result<PreparedRegion, RegionError>
Consumes private ownership and attaches opaque transfer metadata.
Trait Implementations§
impl Send for PrivateRegion
Auto Trait Implementations§
impl !RefUnwindSafe for PrivateRegion
impl !Sync for PrivateRegion
impl Freeze for PrivateRegion
impl Unpin for PrivateRegion
impl UnsafeUnpin for PrivateRegion
impl UnwindSafe for PrivateRegion
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more