Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
PlanStorage
Defined in the planning module.
Rust AI Agent SDK
Storage for plans.
Fields
| Name | Type | Description |
|---|
plans | HashMap<String | Plans by ID |
path | Option<PathBuf> | Storage path |
Methods
new
Create a new storage.
with_path
fn with_path(path: impl Into<PathBuf>) -> Self
Create with file path.
Parameters:
| Name | Type |
|---|
path | impl Into<PathBuf> |
save
fn save(&mut self, plan: Plan) -> ()
Save a plan.
Parameters:
load
fn load(&self, id: &str) -> Option<&Plan>
Load a plan by ID.
Parameters:
load_mut
fn load_mut(&mut self, id: &str) -> Option<&mut Plan>
Load mutable plan by ID.
Parameters:
delete
fn delete(&mut self, id: &str) -> Option<Plan>
Delete a plan.
Parameters:
list
fn list(&self) -> Vec<&Plan>
List all plans.
count
Get plan count.
persist
fn persist(&self) -> std::io::Result<()>
Save to file.
restore
fn restore(&mut self) -> std::io::Result<()>
Load from file.
Source
View on GitHub
praisonai/src/planning/mod.rs at line 402