pub struct ExportedFact {
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§
§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
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 ExportedFact
impl Debug for ExportedFact
Source§impl PartialEq for ExportedFact
impl PartialEq for ExportedFact
impl StructuralPartialEq for ExportedFact
Auto Trait Implementations§
impl Freeze for ExportedFact
impl RefUnwindSafe for ExportedFact
impl Send for ExportedFact
impl Sync for ExportedFact
impl Unpin for ExportedFact
impl UnsafeUnpin for ExportedFact
impl UnwindSafe for ExportedFact
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