pub struct ExportedFact {
pub id: u32,
pub text: String,
pub entity: Option<String>,
pub tags: Vec<String>,
pub metadata: BTreeMap<String, String>,
pub recorded_at: u64,
pub valid_from: u64,
}Expand description
One exported fact — the human-readable, id-free shape Database::export
dumps and an importer re-remembers. Internal ids and
recorded_at are the engine’s bookkeeping and are not preserved across
a round-trip; the knowledge itself (text, subject name, tags, validity
start) is.
Fields§
§id: u32The fact’s id in the database it came from.
Informational, and deliberately not restored on import: a fresh database assigns its own. It is here because edges reference their provenance fact by id, so a dump that carries edges needs something for them to point at — an importer translates old id to new as it goes.
text: StringThe fact text.
entity: Option<String>Subject entity name, if the fact had one.
Tag strings.
metadata: BTreeMap<String, String>Metadata as a sorted key→value map (empty when none) — preserved on import.
recorded_at: u64When the memory learned it (informational; not restorable on import).
valid_from: u64Validity start — preserved on import.
Trait Implementations§
Source§impl Clone for ExportedFact
impl Clone for ExportedFact
Source§fn clone(&self) -> ExportedFact
fn clone(&self) -> ExportedFact
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more