pub struct DedupStore { /* private fields */ }Expand description
In-memory replay-detection store. Single-process only; SPEC §10.2 notes that a multi-worker deployment needs a shared backing store.
check_and_mark returns Ok(()) if the bytes are new in the window, and
Err(ReplayDetected) if they’ve been seen.
Implementations§
Source§impl DedupStore
impl DedupStore
Sourcepub fn new(window_secs: u64) -> Self
pub fn new(window_secs: u64) -> Self
Construct a new store with the given replay-window duration in seconds.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for DedupStore
impl RefUnwindSafe for DedupStore
impl Send for DedupStore
impl Sync for DedupStore
impl Unpin for DedupStore
impl UnsafeUnpin for DedupStore
impl UnwindSafe for DedupStore
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