Skip to main content

SessionSource

Trait SessionSource 

Source
pub trait SessionSource: Send + Sync {
    // Required method
    fn list(&self) -> Vec<SessionSnapshot>;

    // Provided method
    fn detail(&self, session_id: &str) -> Option<SessionSnapshot> { ... }
}
Expand description

Read access to the live session roster.

Required Methods§

Source

fn list(&self) -> Vec<SessionSnapshot>

Snapshot of every running Claude Code session. Order is the implementor’s choice; the TUI sorts again client-side.

Provided Methods§

Source

fn detail(&self, session_id: &str) -> Option<SessionSnapshot>

Fetch a specific session by its ID. None when the session has exited or never existed.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§