pub struct ConnectionIncarnationAllocator { /* private fields */ }Expand description
Validated monotonic connection-incarnation allocator state.
This state is intentionally not Copy or Clone: each transition consumes
its pre-state and returns the one resulting state which must be committed.
Implementations§
Source§impl ConnectionIncarnationAllocator
impl ConnectionIncarnationAllocator
Sourcepub const fn try_restore(
restored: ConnectionIncarnationAllocatorRestore,
) -> Result<Self, ConnectionIncarnationAllocatorRestoreError>
pub const fn try_restore( restored: ConnectionIncarnationAllocatorRestore, ) -> Result<Self, ConnectionIncarnationAllocatorRestoreError>
Restores the durable fixed header after validating the terminal bit.
§Errors
Returns ConnectionIncarnationAllocatorRestoreError unless ordinal
u64::MAX and the exhaustion bit are either both present or both absent.
Sourcepub const fn server_incarnation(&self) -> u64
pub const fn server_incarnation(&self) -> u64
Returns the current durable server incarnation.
Sourcepub const fn last_examined_connection_ordinal(&self) -> Option<u64>
pub const fn last_examined_connection_ordinal(&self) -> Option<u64>
Returns the last allocated or collision-rejected connection ordinal.
Sourcepub const fn connection_ordinal_exhausted(&self) -> bool
pub const fn connection_ordinal_exhausted(&self) -> bool
Returns whether this server incarnation can never mint another ordinal.
Sourcepub const fn as_restore(&self) -> ConnectionIncarnationAllocatorRestore
pub const fn as_restore(&self) -> ConnectionIncarnationAllocatorRestore
Projects the exact fixed header which a binding must persist atomically.
Trait Implementations§
impl Eq for ConnectionIncarnationAllocator
impl StructuralPartialEq for ConnectionIncarnationAllocator
Auto Trait Implementations§
impl Freeze for ConnectionIncarnationAllocator
impl RefUnwindSafe for ConnectionIncarnationAllocator
impl Send for ConnectionIncarnationAllocator
impl Sync for ConnectionIncarnationAllocator
impl Unpin for ConnectionIncarnationAllocator
impl UnsafeUnpin for ConnectionIncarnationAllocator
impl UnwindSafe for ConnectionIncarnationAllocator
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