pub struct InMemoryOtpStore { /* private fields */ }Expand description
In-memory OTP store for unit testing.
Not suitable for production; all data is lost on process exit.
Implementations§
Trait Implementations§
Source§impl Clone for InMemoryOtpStore
impl Clone for InMemoryOtpStore
Source§fn clone(&self) -> InMemoryOtpStore
fn clone(&self) -> InMemoryOtpStore
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for InMemoryOtpStore
impl Default for InMemoryOtpStore
Source§impl OtpStore for InMemoryOtpStore
impl OtpStore for InMemoryOtpStore
Source§async fn find_by_hash(&self, hash: &[u8]) -> OtpResult<Option<OtpRecord>>
async fn find_by_hash(&self, hash: &[u8]) -> OtpResult<Option<OtpRecord>>
Find a record by its token hash.
Source§async fn increment_uses(&self, id: &Uuid, new_count: u32) -> OtpResult<()>
async fn increment_uses(&self, id: &Uuid, new_count: u32) -> OtpResult<()>
Increment the usage counter for a record.
Source§async fn cleanup_expired(&self) -> OtpResult<u64>
async fn cleanup_expired(&self) -> OtpResult<u64>
Remove all expired records (RHELBU-3536 R12).
Auto Trait Implementations§
impl Freeze for InMemoryOtpStore
impl !RefUnwindSafe for InMemoryOtpStore
impl Send for InMemoryOtpStore
impl Sync for InMemoryOtpStore
impl Unpin for InMemoryOtpStore
impl UnsafeUnpin for InMemoryOtpStore
impl !UnwindSafe for InMemoryOtpStore
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