pub struct OpSnapshot {
pub head: Vec<u8>,
pub files: Vec<StateFile>,
pub incremental: bool,
}Expand description
What a task checkpoints at a barrier: a small head written every epoch, and zero or more
immutable files uploaded once. A source, or an operator whose whole state is the head, has no
files (OpSnapshot::whole).
Fields§
§head: Vec<u8>§files: Vec<StateFile>§incremental: booltrue: the head is an incremental head (its files travel apart, possibly none this epoch);
false: a whole snapshot. Restore must route on this, not on whether files is empty.
Implementations§
Source§impl OpSnapshot
impl OpSnapshot
Sourcepub fn whole(head: Vec<u8>) -> OpSnapshot
pub fn whole(head: Vec<u8>) -> OpSnapshot
A whole-state snapshot: all of it in the head, no separate files.
Sourcepub fn head_with_files(head: Vec<u8>, files: Vec<StateFile>) -> OpSnapshot
pub fn head_with_files(head: Vec<u8>, files: Vec<StateFile>) -> OpSnapshot
A file-backed incremental head plus the files it references (which may be empty this epoch).
Trait Implementations§
Source§impl Clone for OpSnapshot
impl Clone for OpSnapshot
Source§fn clone(&self) -> OpSnapshot
fn clone(&self) -> OpSnapshot
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 Debug for OpSnapshot
impl Debug for OpSnapshot
impl Eq for OpSnapshot
Source§impl PartialEq for OpSnapshot
impl PartialEq for OpSnapshot
impl StructuralPartialEq for OpSnapshot
Auto Trait Implementations§
impl Freeze for OpSnapshot
impl RefUnwindSafe for OpSnapshot
impl Send for OpSnapshot
impl Sync for OpSnapshot
impl Unpin for OpSnapshot
impl UnsafeUnpin for OpSnapshot
impl UnwindSafe for OpSnapshot
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.