pub trait Dispatch {
// Required methods
fn commands(&self) -> Vec<CommandInfo>;
fn execute(
&mut self,
id: &str,
params: Value,
) -> Result<Value, CommandError>;
}Expand description
CONTRACT: anything that can list and run commands. Implemented by Registry-backed sessions,
by the control-port client (remote app) and by test doubles. Object-safe.
Required Methods§
fn commands(&self) -> Vec<CommandInfo>
fn execute(&mut self, id: &str, params: Value) -> Result<Value, CommandError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".