Skip to main content

Multiplexer

Trait Multiplexer 

Source
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§

Source

fn can_open_in_place(&self) -> bool

Whether open() returns control instead of taking over the terminal.

Source

fn exists(&self, ctx: &Context) -> bool

Whether a session for this context is running.

Source

fn is_current(&self, ctx: &Context) -> bool

Whether this process runs inside the context’s session.

Source

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.

Source

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.

Source

fn kill(&self, ctx: &Context) -> Result<(), MultiplexerError>

Tear down the context’s session.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§