pub trait SessionBackend: Send + Sync {
// Required methods
fn create_session(
&self,
argv: Vec<String>,
cast_path: PathBuf,
cwd: Option<String>,
env: HashMap<String, String>,
cols: u16,
rows: u16,
) -> Result<Box<dyn Session>, SessionError>;
fn name(&self) -> &str;
}Expand description
Backend that creates terminal sessions.
Built-ins use this via ExecutionContext::create_session rather than
constructing TerminalSession directly. Custom backends (e.g. Docker) go
through the same public surface — see crate::terminal::docker.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".