Skip to main content

CheckpointStore

Trait CheckpointStore 

Source
pub trait CheckpointStore: Send + Sync {
    // Required methods
    fn id(&self) -> String;
    fn save_snapshot<'life0, 'async_trait>(
        &'life0 self,
        snapshot: ThreadSnapshot,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn load_snapshot<'life0, 'life1, 'async_trait>(
        &'life0 self,
        thread_id: &'life1 String,
    ) -> Pin<Box<dyn Future<Output = Result<Option<ThreadSnapshot>, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
}

Required Methods§

Source

fn id(&self) -> String

Source

fn save_snapshot<'life0, 'async_trait>( &'life0 self, snapshot: ThreadSnapshot, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Source

fn load_snapshot<'life0, 'life1, 'async_trait>( &'life0 self, thread_id: &'life1 String, ) -> Pin<Box<dyn Future<Output = Result<Option<ThreadSnapshot>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§