pub enum EpochScope {
All,
Branch(String),
Plan(String),
Workspace(String),
}Expand description
What an epoch’s seal actually covers.
Recorded explicitly rather than inferred from which commit list is populated: an epoch of 400 commits is a very different claim depending on whether that means “this plan did 400 things” or “the workspace happened to contain 400 commits at seal time”, and a reader cannot tell those apart after the fact.
Variants§
All
Everything reachable from main at seal time. The historical default,
and what a .db written before scopes existed deserializes to.
Branch(String)
Everything reachable from one named ref at seal time.
Plan(String)
Only the commits tagged to this epoch while it was the active epoch — i.e. one plan’s own work.
Workspace(String)
Everything in one workspace (namespace) at seal time.
Implementations§
Source§impl EpochScope
impl EpochScope
Sourcepub fn as_storage_str(&self) -> String
pub fn as_storage_str(&self) -> String
Storage form: a single flat string, so it round-trips through one TEXT column without a nested encoding.
Sourcepub fn from_storage_str(s: &str) -> Self
pub fn from_storage_str(s: &str) -> Self
Parse the storage form. An unknown or malformed value falls back to
EpochScope::All — the historical behaviour — so a row written by a
newer version can never make an older one fail to read its own store.