#[non_exhaustive]pub struct CheckpointMeta {
pub id: String,
pub thread_id: String,
pub created_at: SystemTime,
pub step: u32,
pub parent_id: Option<String>,
}Expand description
Metadata about a single checkpoint.
Fields may be added in future versions — construct via CheckpointMeta::new.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: StringUnique checkpoint identifier.
thread_id: StringThread this checkpoint belongs to.
created_at: SystemTimeWhen this checkpoint was created.
step: u32Which superstep this was taken at.
parent_id: Option<String>The checkpoint this one was derived from (lineage tracking).
None for the first checkpoint in a thread.
Implementations§
Source§impl CheckpointMeta
impl CheckpointMeta
Sourcepub fn new(
id: impl Into<String>,
thread_id: impl Into<String>,
step: u32,
) -> Self
pub fn new( id: impl Into<String>, thread_id: impl Into<String>, step: u32, ) -> Self
Create a new checkpoint metadata record.
The parent_id defaults to None. Use with_parent
to set lineage.
Sourcepub fn with_parent(self, parent_id: impl Into<String>) -> Self
pub fn with_parent(self, parent_id: impl Into<String>) -> Self
Set the parent checkpoint ID (the checkpoint this one was derived from).
Trait Implementations§
Source§impl Clone for CheckpointMeta
impl Clone for CheckpointMeta
Source§fn clone(&self) -> CheckpointMeta
fn clone(&self) -> CheckpointMeta
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 Freeze for CheckpointMeta
impl RefUnwindSafe for CheckpointMeta
impl Send for CheckpointMeta
impl Sync for CheckpointMeta
impl Unpin for CheckpointMeta
impl UnsafeUnpin for CheckpointMeta
impl UnwindSafe for CheckpointMeta
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