pub struct Checkpoint<S: Clone> {
pub version: u32,
pub timestamp: i64,
pub state: S,
}Expand description
A versioned, timestamped snapshot of some Clone-able engine state S.
Fields§
§version: u32Monotonically increasing checkpoint version, incremented by the caller on each capture. Lets consumers detect stale/out-of-order restores.
timestamp: i64The bar timestamp the state reflects (i.e. state after processing this bar).
state: SImplementations§
Trait Implementations§
Source§impl<S: Clone + Clone> Clone for Checkpoint<S>
impl<S: Clone + Clone> Clone for Checkpoint<S>
Source§fn clone(&self) -> Checkpoint<S>
fn clone(&self) -> Checkpoint<S>
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 moreSource§impl<'de, S> Deserialize<'de> for Checkpoint<S>where
S: Deserialize<'de> + Clone,
impl<'de, S> Deserialize<'de> for Checkpoint<S>where
S: Deserialize<'de> + Clone,
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
Source§impl<S> Serialize for Checkpoint<S>
impl<S> Serialize for Checkpoint<S>
impl<S: PartialEq + Clone> StructuralPartialEq for Checkpoint<S>
Auto Trait Implementations§
impl<S> Freeze for Checkpoint<S>where
S: Freeze,
impl<S> RefUnwindSafe for Checkpoint<S>where
S: RefUnwindSafe,
impl<S> Send for Checkpoint<S>where
S: Send,
impl<S> Sync for Checkpoint<S>where
S: Sync,
impl<S> Unpin for Checkpoint<S>where
S: Unpin,
impl<S> UnsafeUnpin for Checkpoint<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for Checkpoint<S>where
S: UnwindSafe,
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