pub trait Adapter {
// Required methods
fn id(&self) -> &'static str;
fn detect(&self) -> bool;
fn discover(&self) -> Result<Vec<SessionRef>>;
fn parse(&self, r: &SessionRef) -> Result<Session>;
}Expand description
One supported agent’s on-disk format.
Required Methods§
Sourcefn discover(&self) -> Result<Vec<SessionRef>>
fn discover(&self) -> Result<Vec<SessionRef>>
Find session files (read-only; never modifies anything).
Sourcefn parse(&self, r: &SessionRef) -> Result<Session>
fn parse(&self, r: &SessionRef) -> Result<Session>
Parse one session file into the normalized model. Must be lenient:
unknown/corrupt lines are skipped with a tracing::debug, never a panic,
and never abort the whole file (CLAUDE.md §9).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".