pub struct ConvoIO { /* private fields */ }Implementations§
Source§impl ConvoIO
impl ConvoIO
pub fn new() -> Self
pub fn with_resolver(resolver: PathResolver) -> Self
pub fn resolver(&self) -> &PathResolver
pub fn exists(&self) -> bool
pub fn copilot_dir_path(&self) -> Result<PathBuf>
Sourcepub fn list_session_dirs(&self) -> Result<Vec<PathBuf>>
pub fn list_session_dirs(&self) -> Result<Vec<PathBuf>>
List every session directory (current + legacy), newest first.
Sourcepub fn list_sessions(&self) -> Result<Vec<SessionMetadata>>
pub fn list_sessions(&self) -> Result<Vec<SessionMetadata>>
Return lightweight metadata for every session, newest first.
Sourcepub fn read_session(&self, session_id: &str) -> Result<Session>
pub fn read_session(&self, session_id: &str) -> Result<Session>
Read one session by id (exact or unique prefix).
Sourcepub fn read_session_dir<P: AsRef<Path>>(&self, dir: P) -> Result<Session>
pub fn read_session_dir<P: AsRef<Path>>(&self, dir: P) -> Result<Session>
Read one session by its directory path.
Sourcepub fn read_metadata<P: AsRef<Path>>(&self, dir: P) -> Result<SessionMetadata>
pub fn read_metadata<P: AsRef<Path>>(&self, dir: P) -> Result<SessionMetadata>
Cheap per-session metadata. Copilot session files have no compact header, so this walks the file (sessions are small).
pub fn session_exists(&self, session_id: &str) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConvoIO
impl RefUnwindSafe for ConvoIO
impl Send for ConvoIO
impl Sync for ConvoIO
impl Unpin for ConvoIO
impl UnsafeUnpin for ConvoIO
impl UnwindSafe for ConvoIO
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