pub trait Backend {
// Required methods
fn own_id(&self) -> Result<String>;
fn send(&self, target: &str, text: &str) -> Result<()>;
fn spawn(
&self,
cmd: &str,
args: &[&str],
name: Option<&str>,
) -> Result<String>;
fn close(&self, target: &str) -> Result<()>;
fn list_panes(&self) -> Result<Vec<PaneInfo>>;
fn list_pane_ids(&self) -> Result<Vec<String>>;
fn read_scrollback(&self, target: &str) -> Result<String>;
fn normalize_id(&self, input: &str) -> String;
fn wait_for_ready(&self, target: &str, max_secs: u64, settle_secs: u64);
fn session_name(&self) -> Result<String>;
fn backend_name(&self) -> &str;
}Required Methods§
Sourcefn send(&self, target: &str, text: &str) -> Result<()>
fn send(&self, target: &str, text: &str) -> Result<()>
Send text to target pane (paste + Enter).
Sourcefn spawn(&self, cmd: &str, args: &[&str], name: Option<&str>) -> Result<String>
fn spawn(&self, cmd: &str, args: &[&str], name: Option<&str>) -> Result<String>
Spawn a command in a new pane. Returns the new pane ID.
Sourcefn list_panes(&self) -> Result<Vec<PaneInfo>>
fn list_panes(&self) -> Result<Vec<PaneInfo>>
List all panes with metadata.
Sourcefn list_pane_ids(&self) -> Result<Vec<String>>
fn list_pane_ids(&self) -> Result<Vec<String>>
List IDs of terminal (non-plugin) panes only.
Sourcefn read_scrollback(&self, target: &str) -> Result<String>
fn read_scrollback(&self, target: &str) -> Result<String>
Read full scrollback from a pane.
Sourcefn normalize_id(&self, input: &str) -> String
fn normalize_id(&self, input: &str) -> String
Normalise a user-supplied pane identifier into canonical form.
Sourcefn wait_for_ready(&self, target: &str, max_secs: u64, settle_secs: u64)
fn wait_for_ready(&self, target: &str, max_secs: u64, settle_secs: u64)
Block until target has output, then settle.
Sourcefn session_name(&self) -> Result<String>
fn session_name(&self) -> Result<String>
Name of the session / workspace.
Sourcefn backend_name(&self) -> &str
fn backend_name(&self) -> &str
Backend identifier: "cmux" or "zellij".