pub struct InMemoryVerificationBackend { /* private fields */ }Trait Implementations§
Source§impl VerificationBackend for InMemoryVerificationBackend
impl VerificationBackend for InMemoryVerificationBackend
fn put(&self, token: &VerificationToken)
fn get(&self, id: &str) -> Option<VerificationToken>
Source§fn by_prefix(&self, prefix: &str) -> Vec<VerificationToken>
fn by_prefix(&self, prefix: &str) -> Vec<VerificationToken>
Lookup by
token_prefix — backends index this column so
consume_by_plaintext is one fast SQL hit per attempt.Source§fn mark_consumed(&self, id: &str, now: u64) -> bool
fn mark_consumed(&self, id: &str, now: u64) -> bool
Mark as consumed. Implementations MUST be idempotent so
concurrent verify requests can’t both succeed.
Source§fn purge_expired(&self, now: u64)
fn purge_expired(&self, now: u64)
Best-effort sweep of expired-and-consumed rows. Called
opportunistically — never blocking the hot path.
Auto Trait Implementations§
impl !Freeze for InMemoryVerificationBackend
impl RefUnwindSafe for InMemoryVerificationBackend
impl Send for InMemoryVerificationBackend
impl Sync for InMemoryVerificationBackend
impl Unpin for InMemoryVerificationBackend
impl UnsafeUnpin for InMemoryVerificationBackend
impl UnwindSafe for InMemoryVerificationBackend
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