pub struct Memory {
pub id: i64,
pub text: String,
pub created_at: DateTime<Utc>,
pub last_used: DateTime<Utc>,
pub mentions: u32,
pub importance: f32,
pub tags: Vec<String>,
pub embedding: Option<Vec<f32>>,
}Expand description
A single memory item. (The built-in engine scores over these; the MemPalace adapter maps its hits into the same shape.)
Fields§
§id: i64§text: String§created_at: DateTime<Utc>§last_used: DateTime<Utc>When this memory was last retrieved/used — drives recency.
mentions: u32How many times it has been reinforced (mentioned/used).
importance: f32Stored importance weight in [0,1].
Links / entities / repo associations (used for task relevance and graph).
embedding: Option<Vec<f32>>Optional precomputed embedding. When present (and the query is embedded), similarity is semantic (cosine); otherwise it falls back to lexical.
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
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