pub struct ContextCheckpoint { /* private fields */ }Expand description
A snapshot of non-persistent context state that can be restored.
Implementations§
Source§impl ContextCheckpoint
impl ContextCheckpoint
Sourcepub fn new(handoff: Option<Handoff>, items: Vec<ContextItem>) -> Self
pub fn new(handoff: Option<Handoff>, items: Vec<ContextItem>) -> Self
Creates a structured runtime checkpoint.
Sourcepub const fn len_recent(&self) -> usize
pub const fn len_recent(&self) -> usize
Returns the number of conversation messages in this checkpoint.
Sourcepub fn items(&self) -> &[ContextItem]
pub fn items(&self) -> &[ContextItem]
Returns the checkpointed conversation items.
Sourcepub const fn fork_point(&self) -> u64
pub const fn fork_point(&self) -> u64
Returns the sequence number the next item will receive, as
Context::fork_point does. Every item numbered below it is covered
by this checkpoint, which an empty post-compaction window still
records.
Trait Implementations§
Source§impl Clone for ContextCheckpoint
impl Clone for ContextCheckpoint
Source§impl Debug for ContextCheckpoint
impl Debug for ContextCheckpoint
Source§impl<'de> Deserialize<'de> for ContextCheckpoint
impl<'de> Deserialize<'de> for ContextCheckpoint
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ContextCheckpoint
Source§impl PartialEq for ContextCheckpoint
impl PartialEq for ContextCheckpoint
Source§impl Serialize for ContextCheckpoint
impl Serialize for ContextCheckpoint
impl StructuralPartialEq for ContextCheckpoint
Auto Trait Implementations§
impl Forget for ContextCheckpoint
impl Freeze for ContextCheckpoint
impl Move for ContextCheckpoint
impl RefUnwindSafe for ContextCheckpoint
impl Send for ContextCheckpoint
impl Sync for ContextCheckpoint
impl Unpin for ContextCheckpoint
impl UnsafeUnpin for ContextCheckpoint
impl UnwindSafe for ContextCheckpoint
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.