Skip to main content

Transcript

Trait Transcript 

Source
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§

Source

fn source(&self) -> Source

Which CLI this adapter reads.

Source

fn sessions_root(&self) -> &Path

Directory the CLI records sessions in — whether or not it exists.

Source

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.

Source

fn parse(&self, transcript: &TranscriptRef) -> Result<Conversation, RecallError>

Read one discovered session into the universal conversation format.

Provided Methods§

Source

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".

Implementors§