pub struct Storage(/* private fields */);Expand description
Where an agent or graph keeps run checkpoints.
memory() (the default) uses a fresh in-memory store per run, so
nothing grows; sqlite(path) and custom(store) keep runs for resume.
Implementations§
Source§impl Storage
impl Storage
Sourcepub fn memory() -> Self
pub fn memory() -> Self
Keeps each run’s checkpoints in memory, dropped when the run ends.
Runs cannot be resumed. This is the default.
Costs nothing at build.
Sourcepub fn sqlite(path: impl Into<PathBuf>) -> Self
pub fn sqlite(path: impl Into<PathBuf>) -> Self
Keeps checkpoints in the SQLite file at path, opened at build.
Enables resume(run_id), also from a later process. A route’s daily
cloud spend is kept there too. Needs the sqlite feature, on by default.
Sourcepub fn custom(store: Arc<dyn CheckpointStore>) -> Self
pub fn custom(store: Arc<dyn CheckpointStore>) -> Self
Keeps checkpoints in store, shared by every run.
Enables resume(run_id).
Use it for a store the host already opened.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Storage
impl !UnwindSafe for Storage
impl Forget for Storage
impl Freeze for Storagewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const ArcInner<dyn CheckpointStore> is !null: Freeze,
PhantomData<ArcInner<dyn CheckpointStore>>: Freeze,
impl Move for Storage
impl Send for Storage
impl Sync for Storage
impl Unpin for Storage
impl UnsafeUnpin for Storagewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<dyn CheckpointStore> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn CheckpointStore>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more