pub struct Session { /* private fields */ }Expand description
Represents an active inference session with its own KV cache state.
Sessions hold runtime state (KV cache, token history, etc.) that persists across prefill and decode phases. Multiple sessions can exist simultaneously, each with its own independent state.
Sessions are intentionally not Clone — cloning would imply duplicating
KV cache state, which is not a cheap or well-defined operation.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Session
impl RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnsafeUnpin for Session
impl UnwindSafe for Session
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