pub trait CheckpointStore: Send + Sync {
// Required methods
fn save_sync(&self, agent_key: &str, field: &str, value: Value);
fn load_sync(&self, agent_key: &str, field: &str) -> Option<Value>;
fn load_all_sync(&self, agent_key: &str) -> HashMap<String, Value>;
fn save_all_sync(&self, agent_key: &str, fields: &HashMap<String, Value>);
fn exists_sync(&self, agent_key: &str) -> bool;
}Expand description
A checkpoint store for persisting agent state.
This is a re-export of the trait from sage-persistence, simplified for use in generated code.
Required Methods§
Sourcefn save_sync(&self, agent_key: &str, field: &str, value: Value)
fn save_sync(&self, agent_key: &str, field: &str, value: Value)
Save a field value synchronously (blocks on async).
Sourcefn load_sync(&self, agent_key: &str, field: &str) -> Option<Value>
fn load_sync(&self, agent_key: &str, field: &str) -> Option<Value>
Load a field value synchronously.
Sourcefn load_all_sync(&self, agent_key: &str) -> HashMap<String, Value>
fn load_all_sync(&self, agent_key: &str) -> HashMap<String, Value>
Load all fields for an agent.
Sourcefn save_all_sync(&self, agent_key: &str, fields: &HashMap<String, Value>)
fn save_all_sync(&self, agent_key: &str, fields: &HashMap<String, Value>)
Save all fields atomically.
Sourcefn exists_sync(&self, agent_key: &str) -> bool
fn exists_sync(&self, agent_key: &str) -> bool
Check if any checkpoint exists for an agent.