pub struct SessionConfig {
pub max_sessions: Option<usize>,
pub max_turns_per_session: Option<usize>,
pub max_message_tokens: Option<usize>,
}Fields§
§max_sessions: Option<usize>Maximum number of sessions; when exceeded, LRU evicts whole sessions (unloaded from memory, data preserved) None = no limit
max_turns_per_session: Option<usize>Maximum turns retained per session; when exceeded, the oldest turns are truncated from the front None = no limit
max_message_tokens: Option<usize>Per-message token cap (safety valve); messages exceeding it are not stored in the session history The threshold should be set very high (e.g. 100k) to only catch abnormal cases None = no limit
Trait Implementations§
Source§impl Clone for SessionConfig
impl Clone for SessionConfig
Source§impl Debug for SessionConfig
impl Debug for SessionConfig
Auto Trait Implementations§
impl Forget for SessionConfig
impl Freeze for SessionConfig
impl Move for SessionConfig
impl RefUnwindSafe for SessionConfig
impl Send for SessionConfig
impl Sync for SessionConfig
impl Unpin for SessionConfig
impl UnsafeUnpin for SessionConfig
impl UnwindSafe for SessionConfig
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