pub trait StateManager: Send + Sync {
// Required methods
fn save_state(&self, key: &str, value: &[u8]) -> Result<()>;
fn load_state(&self, key: &str) -> Result<Option<Vec<u8>>>;
fn delete_state(&self, key: &str) -> Result<()>;
fn list_states(&self, prefix: &str) -> Result<Vec<String>>;
}Expand description
状态管理 trait