pub struct Consolidator { /* private fields */ }Expand description
Memory consolidator
Implementations§
Source§impl Consolidator
impl Consolidator
Sourcepub fn new(config: MemoryConfig) -> Self
pub fn new(config: MemoryConfig) -> Self
Create a new consolidator
Sourcepub async fn start_background_consolidation(&self)
pub async fn start_background_consolidation(&self)
Start background consolidation process
Sourcepub async fn stop_background_consolidation(&self)
pub async fn stop_background_consolidation(&self)
Stop background consolidation
Sourcepub async fn consolidate(
&self,
task: ConsolidationTask,
) -> Result<ConsolidationResult, String>
pub async fn consolidate( &self, task: ConsolidationTask, ) -> Result<ConsolidationResult, String>
Perform consolidation tasks
Sourcepub async fn set_memories(&self, memories: HashMap<String, EnhancedMemoryEntry>)
pub async fn set_memories(&self, memories: HashMap<String, EnhancedMemoryEntry>)
Update memories reference
Sourcepub async fn get_memories(&self) -> HashMap<String, EnhancedMemoryEntry>
pub async fn get_memories(&self) -> HashMap<String, EnhancedMemoryEntry>
Get current memories
Auto Trait Implementations§
impl Freeze for Consolidator
impl !RefUnwindSafe for Consolidator
impl Send for Consolidator
impl Sync for Consolidator
impl Unpin for Consolidator
impl !UnwindSafe for Consolidator
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> 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