pub trait PaneSource: Send + Sync {
// Required method
fn capture(&self, session: &str) -> Result<Vec<String>>;
// Provided method
fn last_activity_secs(&self, _session: &str) -> Option<u64> { ... }
}Expand description
Lookup contract: given a tmux session name, return its scrollback
as a list of lines. Implementations may bound the depth — the
production tmux variant takes the last 3000 lines via
capture-pane -S -3000, matching teamctl logs.
Required Methods§
Provided Methods§
Sourcefn last_activity_secs(&self, _session: &str) -> Option<u64>
fn last_activity_secs(&self, _session: &str) -> Option<u64>
Cheap activity probe (#277): the Unix timestamp (seconds) of the
session window’s last activity, or None when it can’t be read.
Callers use it to skip the heavy capture when the pane hasn’t
changed. The default returns None, which keeps callers on the
unconditional-capture path, so existing impls need no change.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".