pub struct ValidatedRegionLayout { /* private fields */ }Expand description
Owned metadata and checked ranges copied from one validated mapping.
This type never retains or returns a slice into cross-process storage.
Implementations§
Source§impl ValidatedRegionLayout
impl ValidatedRegionLayout
Sourcepub fn matches_topology(&self, topology: &RegionSetLayout) -> bool
pub fn matches_topology(&self, topology: &RegionSetLayout) -> bool
Returns whether this validation belongs to an exact composed topology.
Sourcepub unsafe fn validate(
bytes: &[u8],
expected: ValidationExpectations,
topology: &RegionSetLayout,
) -> Result<Self, LayoutError>
pub unsafe fn validate( bytes: &[u8], expected: ValidationExpectations, topology: &RegionSetLayout, ) -> Result<Self, LayoutError>
Validates a mapping while it is quiescent and before peer mutation begins.
§Safety
No process may mutate bytes for the duration of this call. The caller
mapping must be the exact future capability range.
Sourcepub const fn generation(&self) -> u64
pub const fn generation(&self) -> u64
Returns the validated generation.
Sourcepub const fn mapping_size(&self) -> usize
pub const fn mapping_size(&self) -> usize
Returns the exact validated native capability size, including zero padding.
Sourcepub fn slot_range(&self, slot: u32) -> Result<Range<usize>, LayoutError>
pub fn slot_range(&self, slot: u32) -> Result<Range<usize>, LayoutError>
Returns a checked complete slot range without granting memory access.
Sourcepub fn acknowledgement_range(
&self,
index: u32,
) -> Result<Range<usize>, LayoutError>
pub fn acknowledgement_range( &self, index: u32, ) -> Result<Range<usize>, LayoutError>
Returns a checked acknowledgement cell range without granting access.
Trait Implementations§
Source§impl Clone for ValidatedRegionLayout
impl Clone for ValidatedRegionLayout
Source§fn clone(&self) -> ValidatedRegionLayout
fn clone(&self) -> ValidatedRegionLayout
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ValidatedRegionLayout
impl RefUnwindSafe for ValidatedRegionLayout
impl Send for ValidatedRegionLayout
impl Sync for ValidatedRegionLayout
impl Unpin for ValidatedRegionLayout
impl UnsafeUnpin for ValidatedRegionLayout
impl UnwindSafe for ValidatedRegionLayout
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