pub struct OastPollPermit<'a> { /* private fields */ }Expand description
Move-only authority to prepare one atomic poll commit.
The exclusive registration borrow prevents concurrent permits. Events stay local to the permit until consuming completion validates the entire batch.
Implementations§
Source§impl OastPollPermit<'_>
impl OastPollPermit<'_>
Sourcepub const fn poll_ordinal(&self) -> u16
pub const fn poll_ordinal(&self) -> u16
Returns the one-based poll ordinal.
Sourcepub const fn remaining_polls(&self) -> u16
pub const fn remaining_polls(&self) -> u16
Returns remaining polls after this permit was issued.
Sourcepub fn staged_events(&self) -> usize
pub fn staged_events(&self) -> usize
Returns the number of locally staged events.
Sourcepub fn stage_event(
&mut self,
correlation_id: &OastCorrelationId,
event: OastEvent,
observed_at: OastMonotonicTime,
) -> Result<(), OastError>
pub fn stage_event( &mut self, correlation_id: &OastCorrelationId, event: OastEvent, observed_at: OastMonotonicTime, ) -> Result<(), OastError>
Stages one callback without mutating committed event state.
Sourcepub fn finish(
self,
completed_at: OastMonotonicTime,
) -> Result<OastPollReceipt, OastError>
pub fn finish( self, completed_at: OastMonotonicTime, ) -> Result<OastPollReceipt, OastError>
Validates and commits the staged batch atomically.
Trait Implementations§
Source§impl Debug for OastPollPermit<'_>
impl Debug for OastPollPermit<'_>
Source§impl Drop for OastPollPermit<'_>
impl Drop for OastPollPermit<'_>
Auto Trait Implementations§
impl<'a> !UnwindSafe for OastPollPermit<'a>
impl<'a> Freeze for OastPollPermit<'a>
impl<'a> RefUnwindSafe for OastPollPermit<'a>
impl<'a> Send for OastPollPermit<'a>
impl<'a> Sync for OastPollPermit<'a>
impl<'a> Unpin for OastPollPermit<'a>
impl<'a> UnsafeUnpin for OastPollPermit<'a>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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