pub struct Memory {
pub id: MemoryId,
pub content: String,
pub tags: Vec<String>,
pub source: String,
pub created_ns: u64,
pub updated_ns: u64,
pub pinned: bool,
}Expand description
A content-addressable memory record: a piece of content plus tag metadata, source identity, and a pinned flag.
Memories differ structurally from super::super::tasks::Task in
two ways that exercise the CortEX adapter pattern:
tags: Vec<String>— multi-valued field with set-like query semantics (where_tag,where_any_tag,where_all_tags).pinned: bool— toggled via explicit events rather than as a terminal state likeTaskStatus::Completed.
Fields§
§id: MemoryIdStable identifier.
content: StringFree-form payload. RedEX stores the raw bytes; the adapter makes no assumption about structure.
Tag set. Insertion order is preserved; duplicates are not enforced as unique by the adapter (fold relies on the event stream to keep it sane).
source: StringProducer / origin label. Free-form string chosen by callers.
created_ns: u64Wall-clock creation time (unix nanos).
updated_ns: u64Wall-clock last-update time (unix nanos).
pinned: boolWhether the memory is pinned (callers decide what “pinned” means for their domain — typically “keep prominent in queries”).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Memory
impl<'de> Deserialize<'de> for Memory
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
impl Eq for Memory
impl StructuralPartialEq for Memory
Auto Trait Implementations§
impl Freeze for Memory
impl RefUnwindSafe for Memory
impl Send for Memory
impl Sync for Memory
impl Unpin for Memory
impl UnsafeUnpin for Memory
impl UnwindSafe for Memory
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.