pub struct MockIdempotencyStore { /* private fields */ }Expand description
Mock idempotency store with in-memory storage
Implementations§
Source§impl MockIdempotencyStore
impl MockIdempotencyStore
Sourcepub fn with_existing_events(events: Vec<(&str, &str)>) -> Self
pub fn with_existing_events(events: Vec<(&str, &str)>) -> Self
Pre-populate with existing events for testing duplicates.
§Panics
Panics if the internal mutex is poisoned (a prior panic occurred while the lock was held).
Sourcepub fn get_record(
&self,
provider: &str,
event_id: &str,
) -> Option<IdempotencyRecord>
pub fn get_record( &self, provider: &str, event_id: &str, ) -> Option<IdempotencyRecord>
Retrieve the stored record for a (provider, event_id) pair, if one exists.
§Panics
Panics if the internal mutex is poisoned (a prior panic occurred while the lock was held).
Trait Implementations§
Source§impl Default for MockIdempotencyStore
impl Default for MockIdempotencyStore
Source§impl IdempotencyStore for MockIdempotencyStore
impl IdempotencyStore for MockIdempotencyStore
Auto Trait Implementations§
impl !Freeze for MockIdempotencyStore
impl RefUnwindSafe for MockIdempotencyStore
impl Send for MockIdempotencyStore
impl Sync for MockIdempotencyStore
impl Unpin for MockIdempotencyStore
impl UnsafeUnpin for MockIdempotencyStore
impl UnwindSafe for MockIdempotencyStore
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more