pub struct CheckpointView {
pub workspace_id: String,
pub epoch: Option<String>,
pub patch_set: Option<PatchSet>,
pub patch_set_oid: Option<String>,
pub description: Option<String>,
pub annotations: BTreeMap<String, BTreeMap<String, Value>>,
pub is_destroyed: bool,
}Expand description
Subset of MaterializedView that is checkpointed.
We serialize only the essential state, not the full MaterializedView
struct, to keep checkpoints forward-compatible.
Fields§
§workspace_id: StringThe workspace this view belongs to.
epoch: Option<String>Current epoch (from latest Create or Merge).
patch_set: Option<PatchSet>Current patch set (serialized).
patch_set_oid: Option<String>Patch set blob OID.
description: Option<String>Description.
annotations: BTreeMap<String, BTreeMap<String, Value>>Annotations (excluding checkpoint annotations themselves).
is_destroyed: boolWhether workspace is destroyed.
Implementations§
Source§impl CheckpointView
impl CheckpointView
Sourcepub fn from_view(view: &MaterializedView) -> Self
pub fn from_view(view: &MaterializedView) -> Self
Convert a MaterializedView to checkpoint-serializable form.
Sourcepub fn to_view(
&self,
op_count: usize,
) -> Result<MaterializedView, CheckpointError>
pub fn to_view( &self, op_count: usize, ) -> Result<MaterializedView, CheckpointError>
Restore a MaterializedView from checkpoint data.
§Errors
Returns CheckpointError::InvalidData if OIDs cannot be parsed.
Trait Implementations§
Source§impl Clone for CheckpointView
impl Clone for CheckpointView
Source§fn clone(&self) -> CheckpointView
fn clone(&self) -> CheckpointView
Returns a duplicate of the value. Read more
1.0.0 · 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 CheckpointView
impl Debug for CheckpointView
Source§impl<'de> Deserialize<'de> for CheckpointView
impl<'de> Deserialize<'de> for CheckpointView
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 PartialEq for CheckpointView
impl PartialEq for CheckpointView
Source§impl Serialize for CheckpointView
impl Serialize for CheckpointView
impl Eq for CheckpointView
impl StructuralPartialEq for CheckpointView
Auto Trait Implementations§
impl Freeze for CheckpointView
impl RefUnwindSafe for CheckpointView
impl Send for CheckpointView
impl Sync for CheckpointView
impl Unpin for CheckpointView
impl UnsafeUnpin for CheckpointView
impl UnwindSafe for CheckpointView
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,
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.