Skip to main content

PaneResolver

Trait PaneResolver 

Source
pub trait PaneResolver {
    // Required method
    fn pane_index_for(&self, agent_id: &str) -> Option<usize>;
}
Expand description

Trait providing the pane-index for a given agent ID.

cmd_supervisor knows the mapping from session state; tests substitute a closure-backed implementation.

Required Methods§

Source

fn pane_index_for(&self, agent_id: &str) -> Option<usize>

Returns the tmux pane index for agent_id, or None if the agent has no pane (e.g. the supervisor itself).

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<F> PaneResolver for F
where F: Fn(&str) -> Option<usize>,