pub struct AgentCheckpoint { /* private fields */ }Expand description
Stable handle binding one checkpoint identity to a store.
Implementations§
Source§impl AgentCheckpoint
impl AgentCheckpoint
Sourcepub fn new(store: Arc<dyn CheckpointStore>) -> Self
pub fn new(store: Arc<dyn CheckpointStore>) -> Self
Creates a new checkpoint handle with a unique identity.
Sourcepub fn existing(id: CheckpointId, store: Arc<dyn CheckpointStore>) -> Self
pub fn existing(id: CheckpointId, store: Arc<dyn CheckpointStore>) -> Self
Reconnects to an existing checkpoint identity.
Sourcepub const fn id(&self) -> CheckpointId
pub const fn id(&self) -> CheckpointId
Returns the stable checkpoint identity.
Sourcepub fn load(
&self,
) -> Result<(Checkpoint, AgentCheckpointState), CheckpointError>
pub fn load( &self, ) -> Result<(Checkpoint, AgentCheckpointState), CheckpointError>
Loads and validates the latest typed Agent state.
§Errors
Returns CheckpointError when storage or payload validation fails.
Trait Implementations§
Source§impl Clone for AgentCheckpoint
impl Clone for AgentCheckpoint
Source§fn clone(&self) -> AgentCheckpoint
fn clone(&self) -> AgentCheckpoint
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for AgentCheckpoint
impl !UnwindSafe for AgentCheckpoint
impl Freeze for AgentCheckpoint
impl Send for AgentCheckpoint
impl Sync for AgentCheckpoint
impl Unpin for AgentCheckpoint
impl UnsafeUnpin for AgentCheckpoint
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