pub struct EnhancedMemoryEntry {
pub entry: MemoryEntry,
pub memory_type: MemoryType,
pub importance: ImportanceLevel,
pub summary: Option<String>,
pub key_points: Vec<String>,
pub entities: Vec<String>,
pub related_memories: Vec<String>,
pub last_accessed: u64,
pub access_count: u32,
pub decay_factor: f32,
}Expand description
Enhanced memory entry with metadata
Fields§
§entry: MemoryEntryBase memory entry
memory_type: MemoryTypeType of memory
importance: ImportanceLevelImportance level
summary: Option<String>Summary of the conversation
key_points: Vec<String>Extracted key points
entities: Vec<String>Extracted entities (people, places, things mentioned)
Related memory IDs
last_accessed: u64Last accessed timestamp
access_count: u32Access count
decay_factor: f32Decay factor (0.0 to 1.0, 1.0 = fresh, 0.0 = fully decayed)
Implementations§
Source§impl EnhancedMemoryEntry
impl EnhancedMemoryEntry
Sourcepub fn new(entry: MemoryEntry, memory_type: MemoryType) -> Self
pub fn new(entry: MemoryEntry, memory_type: MemoryType) -> Self
Create a new enhanced memory entry
Sourcepub fn mark_accessed(&mut self)
pub fn mark_accessed(&mut self)
Update access information
Sourcepub fn relevance_score(&self) -> f32
pub fn relevance_score(&self) -> f32
Calculate relevance score based on importance, recency, and access frequency
Trait Implementations§
Source§impl Clone for EnhancedMemoryEntry
impl Clone for EnhancedMemoryEntry
Source§fn clone(&self) -> EnhancedMemoryEntry
fn clone(&self) -> EnhancedMemoryEntry
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 Debug for EnhancedMemoryEntry
impl Debug for EnhancedMemoryEntry
Source§impl<'de> Deserialize<'de> for EnhancedMemoryEntry
impl<'de> Deserialize<'de> for EnhancedMemoryEntry
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 EnhancedMemoryEntry
impl RefUnwindSafe for EnhancedMemoryEntry
impl Send for EnhancedMemoryEntry
impl Sync for EnhancedMemoryEntry
impl Unpin for EnhancedMemoryEntry
impl UnwindSafe for EnhancedMemoryEntry
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more