pub trait KeySender: Send + Sync {
// Required methods
fn send(&self, session: &str, key: &EncodedKey) -> Result<()>;
fn scroll(&self, session: &str, direction: ScrollDirection) -> Result<()>;
}Expand description
Lookup contract: forward one tmux key-name to the named session.
key is already encoded — see encode_key for the crossterm →
tmux translation. Implementations must treat the call as
fire-and-forget at the operator’s typing rate; a per-call
tmux send-keys round-trip is acceptable for v1 (the 50ms event
poll already gates throughput).
Required Methods§
fn send(&self, session: &str, key: &EncodedKey) -> Result<()>
Sourcefn scroll(&self, session: &str, direction: ScrollDirection) -> Result<()>
fn scroll(&self, session: &str, direction: ScrollDirection) -> Result<()>
Forward one mouse-wheel tick to the named tmux session as a
terminal-history scroll. Implementations target the pane’s
copy-mode scroll commands, so the agent’s history surfaces the
same way tmux attach + wheel does — wheel-up auto-enters
copy-mode, subsequent ticks scroll the buffer. Wheel-down on a
pane not in copy-mode is a no-op (tmux’s own behaviour).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".