pub trait Multiplexer: Send + Sync {
// Required methods
fn can_open_in_place(&self) -> bool;
fn exists(&self, ctx: &Context) -> bool;
fn is_current(&self, ctx: &Context) -> bool;
fn create(
&self,
ctx: &Context,
values: Option<&HashMap<String, String>>,
) -> Result<(), MultiplexerError>;
fn open(
&self,
ctx: &Context,
values: Option<&HashMap<String, String>>,
) -> Result<(), MultiplexerError>;
fn kill(&self, ctx: &Context) -> Result<(), MultiplexerError>;
}Required Methods§
Sourcefn can_open_in_place(&self) -> bool
fn can_open_in_place(&self) -> bool
Whether open() returns control instead of taking over the terminal.
Sourcefn is_current(&self, ctx: &Context) -> bool
fn is_current(&self, ctx: &Context) -> bool
Whether this process runs inside the context’s session.
Sourcefn create(
&self,
ctx: &Context,
values: Option<&HashMap<String, String>>,
) -> Result<(), MultiplexerError>
fn create( &self, ctx: &Context, values: Option<&HashMap<String, String>>, ) -> Result<(), MultiplexerError>
Create the context’s session without attaching, if it doesn’t exist.
values has open()’s semantics.
Sourcefn open(
&self,
ctx: &Context,
values: Option<&HashMap<String, String>>,
) -> Result<(), MultiplexerError>
fn open( &self, ctx: &Context, values: Option<&HashMap<String, String>>, ) -> Result<(), MultiplexerError>
Create the context’s session if needed, then attach to it.
values feed the layout’s builtin panes and only take effect when
this call creates the session. Pass a mapping (possibly empty) when
opening a freshly created context; None marks a recreated session,
where builtins resume instead of starting anew.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".