pub struct InMemoryTransactionStore { /* private fields */ }Expand description
In-memory transaction store (for development/testing)
Implementations§
Trait Implementations§
Source§impl Default for InMemoryTransactionStore
impl Default for InMemoryTransactionStore
Source§impl TransactionStore for InMemoryTransactionStore
impl TransactionStore for InMemoryTransactionStore
Source§fn create<'life0, 'async_trait>(
&'life0 self,
record: TransactionRecord,
) -> Pin<Box<dyn Future<Output = Result<(), TransactionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create<'life0, 'async_trait>(
&'life0 self,
record: TransactionRecord,
) -> Pin<Box<dyn Future<Output = Result<(), TransactionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create a new transaction
Source§fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<TransactionRecord>, TransactionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<TransactionRecord>, TransactionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a transaction by ID
Source§fn update<'life0, 'async_trait>(
&'life0 self,
record: TransactionRecord,
) -> Pin<Box<dyn Future<Output = Result<(), TransactionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update<'life0, 'async_trait>(
&'life0 self,
record: TransactionRecord,
) -> Pin<Box<dyn Future<Output = Result<(), TransactionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Update an existing transaction
Source§fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), TransactionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), TransactionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete a transaction
Source§fn list_by_user<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<TransactionRecord>, TransactionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_by_user<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<TransactionRecord>, TransactionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List transactions by user_id (for admin/debugging)
Source§fn cleanup_expired<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<usize, TransactionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn cleanup_expired<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<usize, TransactionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Cleanup expired transactions (for background job)
Auto Trait Implementations§
impl !RefUnwindSafe for InMemoryTransactionStore
impl !UnwindSafe for InMemoryTransactionStore
impl Freeze for InMemoryTransactionStore
impl Send for InMemoryTransactionStore
impl Sync for InMemoryTransactionStore
impl Unpin for InMemoryTransactionStore
impl UnsafeUnpin for InMemoryTransactionStore
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