pub struct SessionRepository {
pub runs: RunCoordinator,
/* private fields */
}Fields§
§runs: RunCoordinatorImplementations§
Source§impl SessionRepository
impl SessionRepository
pub fn new(home: &Path) -> Self
pub fn get(&self, id: &str) -> Result<Option<SessionDoc>, SessionError>
pub fn create(&self, name: &str, at: &str) -> Result<SessionDoc, SessionError>
pub fn append( &self, id: &str, message: StoredMessage, expected: Option<u64>, ) -> Result<SessionDoc, SessionError>
pub fn append_exchange( &self, id: &str, user: StoredMessage, assistant: StoredMessage, expected: u64, ) -> Result<SessionDoc, SessionError>
pub fn rename( &self, id: &str, name: &str, expected: Option<u64>, at: &str, ) -> Result<SessionDoc, SessionError>
pub fn archive( &self, id: &str, archived: bool, expected: Option<u64>, at: &str, ) -> Result<SessionDoc, SessionError>
pub fn remove(&self, id: &str) -> Result<(), SessionError>
pub fn list( &self, archived: bool, offset: usize, limit: usize, ) -> Result<(Vec<SessionSummary>, Option<String>), SessionError>
pub fn messages( &self, id: &str, offset: usize, limit: usize, ) -> Result<(Vec<StoredMessage>, Option<String>), SessionError>
pub fn search( &self, query: &str, archived: bool, ) -> Result<Vec<(SessionSummary, String)>, SessionError>
Auto Trait Implementations§
impl Freeze for SessionRepository
impl RefUnwindSafe for SessionRepository
impl Send for SessionRepository
impl Sync for SessionRepository
impl Unpin for SessionRepository
impl UnsafeUnpin for SessionRepository
impl UnwindSafe for SessionRepository
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