pub struct ReaderRegion<M> { /* private fields */ }Expand description
Mapping-lifetime owner that can mint acquire-only capabilities.
Implementations§
Source§impl<M: ReadOnlyMapping> ReaderRegion<M>
impl<M: ReadOnlyMapping> ReaderRegion<M>
Sourcepub fn new(
mapping: M,
layout: ValidatedRegionLayout,
topology: RegionSetLayout,
) -> Result<Self, BindingError>
pub fn new( mapping: M, layout: ValidatedRegionLayout, topology: RegionSetLayout, ) -> Result<Self, BindingError>
Consumes a platform-minted read-only witness.
Sourcepub fn slot(&self, slot: u32) -> Result<ReaderSlot<'_>, BindingError>
pub fn slot(&self, slot: u32) -> Result<ReaderSlot<'_>, BindingError>
Binds one checked slot without exposing shared bytes.
Sourcepub fn copy_payload(
&self,
slot: u32,
expected_sequence: u64,
) -> Result<Vec<u8>, BindingError>
pub fn copy_payload( &self, slot: u32, expected_sequence: u64, ) -> Result<Vec<u8>, BindingError>
Copies one bounded hostile payload and rechecks its publication metadata.
Same-sequence malicious mutation can still produce torn bytes; the returned owned buffer must be decoded as hostile input.
Sourcepub fn acknowledgement(
&self,
target: RoleId,
slot: u32,
) -> Result<AcknowledgementReader<'_>, BindingError>
pub fn acknowledgement( &self, target: RoleId, slot: u32, ) -> Result<AcknowledgementReader<'_>, BindingError>
Binds one checked acknowledgement route without exposing shared bytes.
Auto Trait Implementations§
impl<M> Freeze for ReaderRegion<M>where
M: Freeze,
impl<M> RefUnwindSafe for ReaderRegion<M>where
M: RefUnwindSafe,
impl<M> Send for ReaderRegion<M>where
M: Send,
impl<M> Sync for ReaderRegion<M>where
M: Sync,
impl<M> Unpin for ReaderRegion<M>where
M: Unpin,
impl<M> UnsafeUnpin for ReaderRegion<M>where
M: UnsafeUnpin,
impl<M> UnwindSafe for ReaderRegion<M>where
M: UnwindSafe,
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