pub struct MaterializedView {
pub workspace_id: WorkspaceId,
pub epoch: Option<EpochId>,
pub patch_set: Option<PatchSet>,
pub patch_set_oid: Option<GitOid>,
pub description: Option<String>,
pub annotations: BTreeMap<String, BTreeMap<String, Value>>,
pub op_count: usize,
pub is_destroyed: bool,
}Expand description
The materialized state of a workspace at its current head.
Produced by replaying the workspace’s op log from root to head.
Fields§
§workspace_id: WorkspaceIdThe workspace this view belongs to.
epoch: Option<EpochId>The current epoch of this workspace (from the latest Create or Merge).
patch_set: Option<PatchSet>The current patch set (accumulated from Snapshot operations).
None if no snapshot has been taken yet (the workspace is clean).
patch_set_oid: Option<GitOid>The git blob OID of the latest patch set (from the most recent Snapshot).
Used by callers who need the raw blob without deserializing the patch set.
description: Option<String>Human-readable description (from the latest Describe operation).
annotations: BTreeMap<String, BTreeMap<String, Value>>Annotations accumulated from Annotate operations (latest wins per key).
op_count: usizeTotal number of operations replayed to produce this view.
is_destroyed: boolWhether this workspace has been destroyed.
Implementations§
Source§impl MaterializedView
impl MaterializedView
Sourcepub const fn empty(workspace_id: WorkspaceId) -> Self
pub const fn empty(workspace_id: WorkspaceId) -> Self
Create a new empty view for a workspace.
Sourcepub fn has_changes(&self) -> bool
pub fn has_changes(&self) -> bool
Return true if the workspace has a non-empty patch set.
Trait Implementations§
Source§impl Clone for MaterializedView
impl Clone for MaterializedView
Source§fn clone(&self) -> MaterializedView
fn clone(&self) -> MaterializedView
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MaterializedView
impl Debug for MaterializedView
Source§impl<'de> Deserialize<'de> for MaterializedView
impl<'de> Deserialize<'de> for MaterializedView
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>,
Source§impl Display for MaterializedView
impl Display for MaterializedView
Source§impl PartialEq for MaterializedView
impl PartialEq for MaterializedView
Source§impl Serialize for MaterializedView
impl Serialize for MaterializedView
impl Eq for MaterializedView
impl StructuralPartialEq for MaterializedView
Auto Trait Implementations§
impl Freeze for MaterializedView
impl RefUnwindSafe for MaterializedView
impl Send for MaterializedView
impl Sync for MaterializedView
impl Unpin for MaterializedView
impl UnsafeUnpin for MaterializedView
impl UnwindSafe for MaterializedView
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
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
key and return true if they are equal.