pub struct MemoryCheckpointStore { /* private fields */ }Expand description
In-memory checkpoint store for tests and ephemeral indexers.
Implementations§
Trait Implementations§
Source§impl CheckpointStore for MemoryCheckpointStore
impl CheckpointStore for MemoryCheckpointStore
Source§fn load<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
chain_id: &'life1 str,
indexer_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Checkpoint>, IndexerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn load<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
chain_id: &'life1 str,
indexer_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Checkpoint>, IndexerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Load the latest checkpoint for a given chain + indexer pair.
Source§fn save<'life0, 'async_trait>(
&'life0 self,
checkpoint: Checkpoint,
) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn save<'life0, 'async_trait>(
&'life0 self,
checkpoint: Checkpoint,
) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Save (upsert) a checkpoint.
Source§fn delete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
chain_id: &'life1 str,
indexer_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
chain_id: &'life1 str,
indexer_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Delete a checkpoint (e.g. when resetting an indexer).
Source§impl Default for MemoryCheckpointStore
impl Default for MemoryCheckpointStore
Source§fn default() -> MemoryCheckpointStore
fn default() -> MemoryCheckpointStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for MemoryCheckpointStore
impl RefUnwindSafe for MemoryCheckpointStore
impl Send for MemoryCheckpointStore
impl Sync for MemoryCheckpointStore
impl Unpin for MemoryCheckpointStore
impl UnsafeUnpin for MemoryCheckpointStore
impl UnwindSafe for MemoryCheckpointStore
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