pub struct SemanticSnapshot {
pub snapshot_id: Option<String>,
pub schema_version: Option<u16>,
pub active_principles: BTreeMap<String, PrincipleState>,
pub active_doctrine: BTreeMap<String, DoctrineState>,
pub active_memories: BTreeMap<String, MemoryState>,
pub salience_distribution: SalienceDistribution,
pub unresolved_contradictions: BTreeMap<String, ContradictionState>,
pub trust_state: TrustKeyState,
pub truth_ceiling: TruthCeilingState,
}Expand description
Meaning-level snapshot captured before or after restore.
Fields§
§snapshot_id: Option<String>Optional identifier for this snapshot.
schema_version: Option<u16>Schema version at snapshot time.
active_principles: BTreeMap<String, PrincipleState>Active principles keyed by principle id.
active_doctrine: BTreeMap<String, DoctrineState>Active doctrine entries keyed by doctrine id.
active_memories: BTreeMap<String, MemoryState>Active memories keyed by memory id.
salience_distribution: SalienceDistributionBucketed distribution of salience scores across active memories.
unresolved_contradictions: BTreeMap<String, ContradictionState>Unresolved contradictions keyed by contradiction id.
trust_state: TrustKeyStateCombined trust state for principals and keys.
truth_ceiling: TruthCeilingStateEffective truth ceiling at snapshot time.
Implementations§
Source§impl SemanticSnapshot
impl SemanticSnapshot
Sourcepub fn diff_against_restore(&self, restored: &Self) -> SemanticDiff
pub fn diff_against_restore(&self, restored: &Self) -> SemanticDiff
Diffs the currently accepted semantic state against a candidate restore.
current is the pre-restore state that would be replaced. restored is
the semantic state reconstructed from the candidate backup.
Trait Implementations§
Source§impl Clone for SemanticSnapshot
impl Clone for SemanticSnapshot
Source§fn clone(&self) -> SemanticSnapshot
fn clone(&self) -> SemanticSnapshot
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 SemanticSnapshot
impl Debug for SemanticSnapshot
Source§impl Default for SemanticSnapshot
impl Default for SemanticSnapshot
Source§fn default() -> SemanticSnapshot
fn default() -> SemanticSnapshot
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SemanticSnapshotwhere
SemanticSnapshot: Default,
impl<'de> Deserialize<'de> for SemanticSnapshotwhere
SemanticSnapshot: Default,
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 SemanticSnapshot
impl PartialEq for SemanticSnapshot
Source§fn eq(&self, other: &SemanticSnapshot) -> bool
fn eq(&self, other: &SemanticSnapshot) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SemanticSnapshot
impl Serialize for SemanticSnapshot
impl Eq for SemanticSnapshot
impl StructuralPartialEq for SemanticSnapshot
Auto Trait Implementations§
impl Freeze for SemanticSnapshot
impl RefUnwindSafe for SemanticSnapshot
impl Send for SemanticSnapshot
impl Sync for SemanticSnapshot
impl Unpin for SemanticSnapshot
impl UnsafeUnpin for SemanticSnapshot
impl UnwindSafe for SemanticSnapshot
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