Trait MuxBackend

Source
pub trait MuxBackend: Send + Sync {
    // Required methods
    fn create_session<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<String, MuxError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn create_pane<'life0, 'life1, 'async_trait>(
        &'life0 self,
        session_id: &'life1 str,
        split: SplitType,
    ) -> Pin<Box<dyn Future<Output = Result<String, MuxError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn send_keys<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        pane_id: &'life1 str,
        keys: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), MuxError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             Self: 'async_trait;
    fn capture_pane<'life0, 'life1, 'async_trait>(
        &'life0 self,
        pane_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<String, MuxError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn list_sessions<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Session>, MuxError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn kill_session<'life0, 'life1, 'async_trait>(
        &'life0 self,
        session_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), MuxError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn kill_pane<'life0, 'life1, 'async_trait>(
        &'life0 self,
        pane_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), MuxError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn resize_pane<'life0, 'life1, 'async_trait>(
        &'life0 self,
        pane_id: &'life1 str,
        size: PaneSize,
    ) -> Pin<Box<dyn Future<Output = Result<(), MuxError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn select_pane<'life0, 'life1, 'async_trait>(
        &'life0 self,
        pane_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), MuxError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn list_panes<'life0, 'life1, 'async_trait>(
        &'life0 self,
        session_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Pane>, MuxError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn attach_session<'life0, 'life1, 'async_trait>(
        &'life0 self,
        session_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), MuxError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn detach_session<'life0, 'life1, 'async_trait>(
        &'life0 self,
        session_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), MuxError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
}
Expand description

The core trait that all multiplexer backends must implement

Required Methods§

Source

fn create_session<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<String, MuxError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Create a new session with the given name

Source

fn create_pane<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 str, split: SplitType, ) -> Pin<Box<dyn Future<Output = Result<String, MuxError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Create a new pane in the specified session

Source

fn send_keys<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, pane_id: &'life1 str, keys: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<(), MuxError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Send keystrokes to a specific pane

Source

fn capture_pane<'life0, 'life1, 'async_trait>( &'life0 self, pane_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<String, MuxError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Capture the current contents of a pane

Source

fn list_sessions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<Session>, MuxError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

List all sessions

Source

fn kill_session<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), MuxError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Kill a session and all its panes

Source

fn kill_pane<'life0, 'life1, 'async_trait>( &'life0 self, pane_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), MuxError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Kill a specific pane

Source

fn resize_pane<'life0, 'life1, 'async_trait>( &'life0 self, pane_id: &'life1 str, size: PaneSize, ) -> Pin<Box<dyn Future<Output = Result<(), MuxError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Resize a pane

Source

fn select_pane<'life0, 'life1, 'async_trait>( &'life0 self, pane_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), MuxError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Select (focus) a pane

Source

fn list_panes<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<Pane>, MuxError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

List all panes in a session

Source

fn attach_session<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), MuxError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Attach to a session

Source

fn detach_session<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), MuxError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Detach from a session

Implementors§