Skip to main content

KeyDispatcher

Trait KeyDispatcher 

Source
pub trait KeyDispatcher {
    // Required method
    fn send_key(
        &mut self,
        session: &str,
        pane_index: usize,
        key: &str,
    ) -> Result<()>;
}
Expand description

Abstraction over tmux send-keys so auto_approve_pane can be tested without spawning tmux.

Required Methods§

Source

fn send_key( &mut self, session: &str, pane_index: usize, key: &str, ) -> Result<()>

Sends a single key (in tmux key-name notation) to the given pane.

Returns the dispatch result; failures are surfaced to the caller so it can decide whether to log or abort.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§