Skip to main content

CheckpointSystemTrait

Trait CheckpointSystemTrait 

Source
pub trait CheckpointSystemTrait: Send + Sync {
    // Required methods
    fn save<'life0, 'life1, 'async_trait>(
        &'life0 self,
        data: &'life1 CheckpointData,
    ) -> Pin<Box<dyn Future<Output = Layer2Result<CheckpointId>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn load<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        session_id: &'life1 SessionId,
        checkpoint_id: Option<&'life2 CheckpointId>,
    ) -> Pin<Box<dyn Future<Output = Layer2Result<Option<CheckpointData>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn list<'life0, 'life1, 'async_trait>(
        &'life0 self,
        session_id: &'life1 SessionId,
    ) -> Pin<Box<dyn Future<Output = Layer2Result<Vec<CheckpointMeta>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn delete<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        session_id: &'life1 SessionId,
        checkpoint_id: &'life2 CheckpointId,
    ) -> Pin<Box<dyn Future<Output = Layer2Result<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn verify(&self, path: &Path) -> Layer2Result<bool>;
}
Expand description

检查点系统接口

Required Methods§

Source

fn save<'life0, 'life1, 'async_trait>( &'life0 self, data: &'life1 CheckpointData, ) -> Pin<Box<dyn Future<Output = Layer2Result<CheckpointId>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

保存检查点

Source

fn load<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, checkpoint_id: Option<&'life2 CheckpointId>, ) -> Pin<Box<dyn Future<Output = Layer2Result<Option<CheckpointData>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

加载检查点

Source

fn list<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Layer2Result<Vec<CheckpointMeta>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

列出会话的所有检查点

Source

fn delete<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, checkpoint_id: &'life2 CheckpointId, ) -> Pin<Box<dyn Future<Output = Layer2Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

删除检查点

Source

fn verify(&self, path: &Path) -> Layer2Result<bool>

验证检查点完整性

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§