pub struct WriterSlot<'a> { /* private fields */ }Expand description
Sole-writer capability bound to a validated writable mapping.
Implementations§
Source§impl<'a> WriterSlot<'a>
impl<'a> WriterSlot<'a>
Sourcepub unsafe fn bind(
header: &'a SlotMetadata,
binding: WriterSlotBinding,
) -> Result<Self, SlotError>
pub unsafe fn bind( header: &'a SlotMetadata, binding: WriterSlotBinding, ) -> Result<Self, SlotError>
Binds atomic metadata reached through the sole writer’s mapping.
§Safety
header must reside at the checked slot offset represented by
binding. This process must be the only holder of a writable mapping,
and the mapping must remain live for 'a. No other writer capability
may be bound for this slot while this value exists.
Sourcepub fn prepare_publish(
&mut self,
sequence: u64,
acknowledgement: Option<AcknowledgementObservation>,
) -> Result<PublishReservation<'_>, SlotError>
pub fn prepare_publish( &mut self, sequence: u64, acknowledgement: Option<AcknowledgementObservation>, ) -> Result<PublishReservation<'_>, SlotError>
Checks sequence/slot/reuse invariants before payload mutation begins.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for WriterSlot<'a>
impl<'a> !Sync for WriterSlot<'a>
impl<'a> !UnwindSafe for WriterSlot<'a>
impl<'a> Freeze for WriterSlot<'a>
impl<'a> Send for WriterSlot<'a>
impl<'a> Unpin for WriterSlot<'a>
impl<'a> UnsafeUnpin for WriterSlot<'a>
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