pub struct MemoryFragment<T> {
pub id: FactId,
pub payload: T,
pub t_ns: u128,
pub valid_from: Option<u128>,
pub valid_to: Option<u128>,
pub confidence: f64,
pub tags: Vec<String>,
pub sources: Vec<FactId>,
pub embedding: Option<Vec<f64>>,
pub parent_fragment_id: Option<FactId>,
pub provenance: Option<String>,
}Expand description
A single semantic-memory fact. This is pattern vocabulary, not a protocol message, storage record owner, restore contract, or agentic runtime.
Fields§
§id: FactIdid field for id.
payload: Tpayload field for payload.
t_ns: u128t_ns field for t ns.
valid_from: Option<u128>valid_from field for valid from.
valid_to: Option<u128>valid_to field for valid to.
confidence: f64confidence field for confidence.
tags field for tags.
sources: Vec<FactId>sources field for sources.
embedding: Option<Vec<f64>>embedding field for embedding.
parent_fragment_id: Option<FactId>parent_fragment_id field for parent fragment id.
provenance: Option<String>provenance field for provenance.
Implementations§
Trait Implementations§
Source§impl<T: Clone> Clone for MemoryFragment<T>
impl<T: Clone> Clone for MemoryFragment<T>
Source§fn clone(&self) -> MemoryFragment<T>
fn clone(&self) -> MemoryFragment<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for MemoryFragment<T>
impl<T: Debug> Debug for MemoryFragment<T>
Source§impl<T: PartialEq> PartialEq for MemoryFragment<T>
impl<T: PartialEq> PartialEq for MemoryFragment<T>
impl<T> StructuralPartialEq for MemoryFragment<T>
Auto Trait Implementations§
impl<T> Freeze for MemoryFragment<T>where
T: Freeze,
impl<T> RefUnwindSafe for MemoryFragment<T>where
T: RefUnwindSafe,
impl<T> Send for MemoryFragment<T>where
T: Send,
impl<T> Sync for MemoryFragment<T>where
T: Sync,
impl<T> Unpin for MemoryFragment<T>where
T: Unpin,
impl<T> UnsafeUnpin for MemoryFragment<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for MemoryFragment<T>where
T: UnwindSafe,
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