pub struct PersistenceConfig {
pub auto_save: bool,
pub auto_load: bool,
pub max_messages: usize,
pub token_limit: usize,
}Expand description
Memory persistence configuration
Fields§
§auto_save: boolAuto-save after each save_context call
auto_load: boolAuto-load on first access
max_messages: usizeMaximum messages to keep in memory before compression
token_limit: usizeToken limit for summary buffer memory
Implementations§
Source§impl PersistenceConfig
impl PersistenceConfig
pub fn new() -> Self
pub fn with_auto_save(self, auto_save: bool) -> Self
pub fn with_auto_load(self, auto_load: bool) -> Self
pub fn with_max_messages(self, max_messages: usize) -> Self
pub fn with_token_limit(self, token_limit: usize) -> Self
Trait Implementations§
Source§impl Clone for PersistenceConfig
impl Clone for PersistenceConfig
Source§fn clone(&self) -> PersistenceConfig
fn clone(&self) -> PersistenceConfig
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 PersistenceConfig
impl Debug for PersistenceConfig
Auto Trait Implementations§
impl Freeze for PersistenceConfig
impl RefUnwindSafe for PersistenceConfig
impl Send for PersistenceConfig
impl Sync for PersistenceConfig
impl Unpin for PersistenceConfig
impl UnsafeUnpin for PersistenceConfig
impl UnwindSafe for PersistenceConfig
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