pub struct ReplayNonceCache { /* private fields */ }Expand description
High-concurrency 64-way sharded bounded TTL replay-nonce cache.
Implementations§
Source§impl ReplayNonceCache
Inherent 64-shard bounded TTL replay-nonce operations for ReplayNonceCache.
impl ReplayNonceCache
Inherent 64-shard bounded TTL replay-nonce operations for ReplayNonceCache.
Sourcepub fn new(max_entries: usize) -> Self
pub fn new(max_entries: usize) -> Self
Creates a 64-way sharded bounded ReplayNonceCache.
§Arguments
usize- Maximum entries tracked across all shards (>= 1).
§Returns
Self- Ready replay cache.
Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Returns the active entry count across all 64 shards in O(1) time.
§Returns
usize- Tracked nonce count.
Trait Implementations§
Auto Trait Implementations§
impl Forget for ReplayNonceCache
impl Freeze for ReplayNonceCachewhere
*const ArcInner<ReplayNonceCacheInner> is !null: Freeze,
PhantomData<ArcInner<ReplayNonceCacheInner>>: Freeze,
impl Move for ReplayNonceCache
impl RefUnwindSafe for ReplayNonceCachewhere
Atomic<usize>: RefUnwindSafe,
RwLock<HashMap<[u8; 32], u64, BuildHasherDefault<XxHash3_64>>>: RefUnwindSafe,
impl Send for ReplayNonceCache
impl Sync for ReplayNonceCache
impl Unpin for ReplayNonceCache
impl UnsafeUnpin for ReplayNonceCachewhere
*const ArcInner<ReplayNonceCacheInner> is !null: UnsafeUnpin,
PhantomData<ArcInner<ReplayNonceCacheInner>>: UnsafeUnpin,
impl UnwindSafe for ReplayNonceCachewhere
Arc<ReplayNonceCacheInner>: UnwindSafe,
Blanket Implementations§
impl<T> AnySend for T
impl<T> AnySendClone for T
impl<T> AnySendSync for T
impl<T> AnySendSyncClone for T
impl<T> AnySync for T
impl<T> AnySyncClone for T
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