pub struct Checkpoints(/* private fields */);Expand description
The newest checkpoint of a run in progress, readable while the run is being driven.
The run itself holds the agent, so an embedder cannot call
Agent::export_checkpoint between its
events. The run instead records a checkpoint each time it emits
AgentEvent::Checkpoint, before the event
is queued; this handle, taken with
Run::checkpoints before the run is driven,
reads it from the event handler.
The checkpoint read is the one of that event or of a later one: the run keeps progressing while the handler awaits, so it may have checkpointed again. Either is a consistent state to restore.
Implementations§
Source§impl Checkpoints
impl Checkpoints
Sourcepub fn latest(&self) -> Option<AgentCheckpoint>
pub fn latest(&self) -> Option<AgentCheckpoint>
The newest checkpoint the run recorded, or None before its first
AgentEvent::Checkpoint.
Trait Implementations§
Source§impl Clone for Checkpoints
impl Clone for Checkpoints
Source§impl Debug for Checkpoints
impl Debug for Checkpoints
Auto Trait Implementations§
impl Forget for Checkpoints
impl Freeze for Checkpoints
impl Move for Checkpoints
impl RefUnwindSafe for Checkpoints
impl Send for Checkpoints
impl Sync for Checkpoints
impl Unpin for Checkpoints
impl UnsafeUnpin for Checkpoints
impl UnwindSafe for Checkpoints
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