pub trait Checkpointer<S: GraphState>: Send + Sync {
// Required methods
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: Uuid,
step: u64,
state: &'life1 S,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load<'life0, 'async_trait>(
&'life0 self,
run_id: Uuid,
step: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<Option<S>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list<'life0, 'async_trait>(
&'life0 self,
run_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<u64>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn save_active<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: Uuid,
step: u64,
active: &'life1 [ActiveSnapshot],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn load_active<'life0, 'async_trait>(
&'life0 self,
run_id: Uuid,
step: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<ActiveSnapshot>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Expand description
Trait for storing & retrieving graph state at superstep boundaries.
Required Methods§
Sourcefn save<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: Uuid,
step: u64,
state: &'life1 S,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: Uuid,
step: u64,
state: &'life1 S,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Save state at step for run_id.
Provided Methods§
Sourcefn save_active<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: Uuid,
step: u64,
active: &'life1 [ActiveSnapshot],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_active<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: Uuid,
step: u64,
active: &'life1 [ActiveSnapshot],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Save the engine’s active task snapshot alongside state. Default
is no-op — older checkpointers won’t persist the active set, and
engine::resume falls back to the start node when load_active
returns empty.