pub struct LocalNonceWindow { /* private fields */ }Expand description
Thread-local nonce allocation window.
Implementations§
Source§impl LocalNonceWindow
impl LocalNonceWindow
pub fn empty() -> Self
Sourcepub fn next_nonce(&mut self, dispenser: &ChunkedNonceDispenser) -> Option<u64>
pub fn next_nonce(&mut self, dispenser: &ChunkedNonceDispenser) -> Option<u64>
Dispenses the next 64-bit nonce. Increments local counter with zero atomic instructions.
Replenishes from dispenser when the local chunk is exhausted.
Trait Implementations§
Source§impl Clone for LocalNonceWindow
impl Clone for LocalNonceWindow
impl Copy for LocalNonceWindow
Auto Trait Implementations§
impl Freeze for LocalNonceWindow
impl RefUnwindSafe for LocalNonceWindow
impl Send for LocalNonceWindow
impl Sync for LocalNonceWindow
impl Unpin for LocalNonceWindow
impl UnsafeUnpin for LocalNonceWindow
impl UnwindSafe for LocalNonceWindow
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