pub struct ActiveWriter { /* private fields */ }Expand description
Stable sole-writer mapping. It is movable between threads but deliberately not shareable between threads.
use native_ipc::active::ActiveWriter;
fn assert_sync<T: Sync>() {}
assert_sync::<ActiveWriter>();Implementations§
Source§impl ActiveWriter
impl ActiveWriter
Sourcepub const fn is_empty(&self) -> bool
pub const fn is_empty(&self) -> bool
Whether the logical payload is empty (always false for valid regions).
Sourcepub fn guard_capability(&self) -> GuardCapability
pub fn guard_capability(&self) -> GuardCapability
Reports the guard policy applied to this endpoint’s own view mapping and whether inaccessible guard bands are actually installed around it.
Guard bands contain in-process linear overruns past this view. They do not constrain the peer’s own address space, and they do not constrain aliases created by a hostile holder of delegated native capability. The receiving endpoint always applies best-effort installation; the creating endpoint applies the policy requested for the region.
Sourcepub fn write_from(
&mut self,
offset: usize,
source: &[u8],
) -> Result<(), AccessError>
pub fn write_from( &mut self, offset: usize, source: &[u8], ) -> Result<(), AccessError>
Copies caller bytes into the sole writable mapping.
Sourcepub fn fill(
&mut self,
range: Range<usize>,
value: u8,
) -> Result<(), AccessError>
pub fn fill( &mut self, range: Range<usize>, value: u8, ) -> Result<(), AccessError>
Fills a checked logical range with one byte value.
Sourcepub fn prefault(
&mut self,
range: Range<usize>,
) -> Result<PrefaultResult, AccessError>
pub fn prefault( &mut self, range: Range<usize>, ) -> Result<PrefaultResult, AccessError>
Touches one byte per covered page off-thread without changing contents.
Source§impl ActiveWriter
impl ActiveWriter
Sourcepub fn bind(
self,
layout: ValidatedRegionLayout,
topology: RegionSetLayout,
) -> Result<WriterRegion<BoundWriteMapping>, Box<BindRejected<ActiveWriter>>>
pub fn bind( self, layout: ValidatedRegionLayout, topology: RegionSetLayout, ) -> Result<WriterRegion<BoundWriteMapping>, Box<BindRejected<ActiveWriter>>>
Consumes this committed mapping into an audited core write capability.
On rejection the returned BindRejected carries this exact writer back
through BindRejected::into_inner.