pub struct MemorySaver { /* private fields */ }Expand description
In-memory checkpointer (for development/testing).
Implementations§
Source§impl MemorySaver
impl MemorySaver
Trait Implementations§
Source§impl Checkpointer for MemorySaver
impl Checkpointer for MemorySaver
Source§fn put<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
config: &'life1 CheckpointConfig,
checkpoint: &'life2 Checkpoint,
) -> Pin<Box<dyn Future<Output = Result<(), SynapticError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn put<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
config: &'life1 CheckpointConfig,
checkpoint: &'life2 Checkpoint,
) -> Pin<Box<dyn Future<Output = Result<(), SynapticError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Save a checkpoint for the given thread.
Source§fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 CheckpointConfig,
) -> Pin<Box<dyn Future<Output = Result<Option<Checkpoint>, SynapticError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 CheckpointConfig,
) -> Pin<Box<dyn Future<Output = Result<Option<Checkpoint>, SynapticError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a checkpoint. If
config.checkpoint_id is set, returns that specific
checkpoint; otherwise returns the latest checkpoint for the thread.Source§fn list<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 CheckpointConfig,
) -> Pin<Box<dyn Future<Output = Result<Vec<Checkpoint>, SynapticError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 CheckpointConfig,
) -> Pin<Box<dyn Future<Output = Result<Vec<Checkpoint>, SynapticError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List all checkpoints for a thread, ordered oldest to newest.
Source§impl Default for MemorySaver
impl Default for MemorySaver
Source§fn default() -> MemorySaver
fn default() -> MemorySaver
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for MemorySaver
impl !RefUnwindSafe for MemorySaver
impl Send for MemorySaver
impl Sync for MemorySaver
impl Unpin for MemorySaver
impl UnsafeUnpin for MemorySaver
impl UnwindSafe for MemorySaver
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