pub trait Transcript: Send + Sync {
// Required methods
fn source(&self) -> Source;
fn sessions_root(&self) -> &Path;
fn discover(
&self,
since: Option<SystemTime>,
) -> Result<Vec<TranscriptRef>, RecallError>;
fn parse(
&self,
transcript: &TranscriptRef,
) -> Result<Conversation, RecallError>;
// Provided method
fn is_installed(&self) -> bool { ... }
}Expand description
A CLI’s on-disk session records, as recall-echo reads them.
Implementors are constructed against an explicit root, so a test drives one
over a tempdir tree and the real thing over $HOME.
Required Methods§
Sourcefn sessions_root(&self) -> &Path
fn sessions_root(&self) -> &Path
Directory the CLI records sessions in — whether or not it exists.
Sourcefn discover(
&self,
since: Option<SystemTime>,
) -> Result<Vec<TranscriptRef>, RecallError>
fn discover( &self, since: Option<SystemTime>, ) -> Result<Vec<TranscriptRef>, RecallError>
Sessions written strictly after since, oldest first.
A missing root is not an error: a CLI that has never run has no sessions, which is exactly an empty list.
Sourcefn parse(&self, transcript: &TranscriptRef) -> Result<Conversation, RecallError>
fn parse(&self, transcript: &TranscriptRef) -> Result<Conversation, RecallError>
Read one discovered session into the universal conversation format.
Provided Methods§
Sourcefn is_installed(&self) -> bool
fn is_installed(&self) -> bool
True when this CLI has recorded at least one session on this machine.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".