pub struct MemoryIdempotencyStore { /* private fields */ }Expand description
In-memory idempotency store
Tracks extraction results by idempotency key to prevent duplicate processing. Useful for development and testing; production should use persistent storage.
§Example
use stygian_plugin::storage::MemoryIdempotencyStore;
use stygian_plugin::domain::{IdempotencyKey, ExtractionResult};
let store = MemoryIdempotencyStore::new();Implementations§
Trait Implementations§
Source§impl Default for MemoryIdempotencyStore
impl Default for MemoryIdempotencyStore
Source§impl IdempotencyKeyStore for MemoryIdempotencyStore
impl IdempotencyKeyStore for MemoryIdempotencyStore
Source§fn store_result<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 IdempotencyKey,
result: &'life2 ExtractionResult,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn store_result<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 IdempotencyKey,
result: &'life2 ExtractionResult,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Store an extraction result under an idempotency key
Source§fn get_result<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 IdempotencyKey,
) -> Pin<Box<dyn Future<Output = Result<Option<ExtractionResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_result<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 IdempotencyKey,
) -> Pin<Box<dyn Future<Output = Result<Option<ExtractionResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retrieve a cached result by idempotency key
Source§fn delete_result<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 IdempotencyKey,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_result<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 IdempotencyKey,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete an old result (cleanup)
Auto Trait Implementations§
impl Freeze for MemoryIdempotencyStore
impl !RefUnwindSafe for MemoryIdempotencyStore
impl Send for MemoryIdempotencyStore
impl Sync for MemoryIdempotencyStore
impl Unpin for MemoryIdempotencyStore
impl UnsafeUnpin for MemoryIdempotencyStore
impl !UnwindSafe for MemoryIdempotencyStore
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