pub struct ClientNonceManager { /* private fields */ }Implementations§
Source§impl ClientNonceManager
impl ClientNonceManager
pub fn new() -> Self
pub fn with_next(next_nonce: u64) -> Result<Self>
pub fn peek(&self) -> u64
pub fn next_nonce(&mut self) -> Result<u64>
Sourcepub fn next_nonce_at(&mut self, created_at: i64) -> Result<u64>
pub fn next_nonce_at(&mut self, created_at: i64) -> Result<u64>
Clock-derived nonce, max(last + 1, created_at) (Section 6.2): it
stays monotonic across restarts, restores, and devices sharing a key.
Sourcepub fn observe_max_nonce(&mut self, max_nonce: u64, now_ms: i64) -> Result<()>
pub fn observe_max_nonce(&mut self, max_nonce: u64, now_ms: i64) -> Result<()>
Applies a Max-Seen-Nonce value. A value more than MAX_NONCE_JUMP
beyond max(next_nonce, now_ms) is rejected rather than applied.
pub fn observe_max_nonce_header( &mut self, value: &str, now_ms: i64, ) -> Result<()>
Trait Implementations§
Source§impl Clone for ClientNonceManager
impl Clone for ClientNonceManager
Source§impl Debug for ClientNonceManager
impl Debug for ClientNonceManager
Source§impl Default for ClientNonceManager
impl Default for ClientNonceManager
impl Eq for ClientNonceManager
Source§impl PartialEq for ClientNonceManager
impl PartialEq for ClientNonceManager
impl StructuralPartialEq for ClientNonceManager
Auto Trait Implementations§
impl Freeze for ClientNonceManager
impl RefUnwindSafe for ClientNonceManager
impl Send for ClientNonceManager
impl Sync for ClientNonceManager
impl Unpin for ClientNonceManager
impl UnsafeUnpin for ClientNonceManager
impl UnwindSafe for ClientNonceManager
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.