pub struct SimpleForgetter;Expand description
Simple forgetter that merges the oldest L3 files when the count exceeds
the threshold. Files are concatenated into a single _consolidated_<n>.md
and the originals are deleted.
Trait Implementations§
Source§impl Forgetter for SimpleForgetter
impl Forgetter for SimpleForgetter
Source§fn maybe_consolidate<'life0, 'life1, 'async_trait>(
&'life0 self,
store: &'life1 Arc<dyn MemoryStore>,
threshold: usize,
) -> Pin<Box<dyn Future<Output = Result<usize, MemoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn maybe_consolidate<'life0, 'life1, 'async_trait>(
&'life0 self,
store: &'life1 Arc<dyn MemoryStore>,
threshold: usize,
) -> Pin<Box<dyn Future<Output = Result<usize, MemoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Run consolidation if the L3 file count exceeds
threshold.
Returns the number of files removed.Auto Trait Implementations§
impl Freeze for SimpleForgetter
impl RefUnwindSafe for SimpleForgetter
impl Send for SimpleForgetter
impl Sync for SimpleForgetter
impl Unpin for SimpleForgetter
impl UnsafeUnpin for SimpleForgetter
impl UnwindSafe for SimpleForgetter
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