struct OutgoingIndexEntry {
index: AtomicU64,
is_dirty: AtomicBool,
}Expand description
Tracks outgoing ticket indices for a channel, starting from 0.
Fields§
§index: AtomicU64§is_dirty: AtomicBoolImplementations§
Source§impl OutgoingIndexEntry
impl OutgoingIndexEntry
Sourcefn increment(&self) -> u64
fn increment(&self) -> u64
Increments the index and marks it as dirty if within bounds.
The value returned is the value before the increment, saturating at [TicketBuilder::MAX_TICKET_INDEX].
Sourcefn set(&self, new_value: u64) -> u64
fn set(&self, new_value: u64) -> u64
Sets the index to the maximum of new_value and the current index value.
Marks the index as dirty if the value was increased.
Returns the new value of the index, saturating at [TicketBuilder::MAX_TICKET_INDEX].
Sourcefn mark_clean(&self)
fn mark_clean(&self)
Marks the index as clean.
Trait Implementations§
Source§impl Debug for OutgoingIndexEntry
impl Debug for OutgoingIndexEntry
Auto Trait Implementations§
impl !Freeze for OutgoingIndexEntry
impl RefUnwindSafe for OutgoingIndexEntry
impl Send for OutgoingIndexEntry
impl Sync for OutgoingIndexEntry
impl Unpin for OutgoingIndexEntry
impl UnwindSafe for OutgoingIndexEntry
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more