#[non_exhaustive]pub struct MemoryEntry {
pub id: String,
pub content: String,
pub tags: Vec<String>,
pub source: Option<String>,
pub created_ms: i64,
}Expand description
One persisted memory record.
Owned (no borrows) so it round-trips through serde and across .await
boundaries cleanly. Fields are intentionally minimal — apps that need
richer schemas can wrap this with their own struct and store JSON in
content.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: StringStable id assigned by the backend. Empty if the caller has not yet committed the entry.
content: StringFree-form fact / summary text. This is what recall returns and what gets injected into a future system prompt.
Optional keywords for cheap retrieval. Backends without semantic
indexing fall back to keyword match across content + tags.
source: Option<String>Where the entry came from (session id, user, app name, …). Useful for debugging and for multi-tenant filtering.
created_ms: i64Milliseconds since unix epoch.
Implementations§
Trait Implementations§
Source§impl Clone for MemoryEntry
impl Clone for MemoryEntry
Source§fn clone(&self) -> MemoryEntry
fn clone(&self) -> MemoryEntry
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 MemoryEntry
impl Debug for MemoryEntry
Source§impl<'de> Deserialize<'de> for MemoryEntry
impl<'de> Deserialize<'de> for MemoryEntry
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
Auto Trait Implementations§
impl Freeze for MemoryEntry
impl RefUnwindSafe for MemoryEntry
impl Send for MemoryEntry
impl Sync for MemoryEntry
impl Unpin for MemoryEntry
impl UnsafeUnpin for MemoryEntry
impl UnwindSafe for MemoryEntry
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