pub struct SessionDb { /* private fields */ }Implementations§
Source§impl SessionDb
impl SessionDb
pub fn open(home_dir: &Path) -> Result<Self>
pub fn save_session( &self, id: &str, source: &str, model: &str, started_at: f64, ended_at: f64, input_tokens: u32, output_tokens: u32, message_count: u32, ) -> Result<()>
pub fn append_messages( &self, session_id: &str, messages: &[(String, String, String, f64)], ) -> Result<()>
pub fn search(&self, query: &str, limit: usize) -> Result<Vec<String>>
Auto Trait Implementations§
impl Freeze for SessionDb
impl RefUnwindSafe for SessionDb
impl Send for SessionDb
impl Sync for SessionDb
impl Unpin for SessionDb
impl UnsafeUnpin for SessionDb
impl UnwindSafe for SessionDb
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