pub trait CommandDispatch {
// Required method
fn run(
&self,
context: &dyn Any,
transport: &TransportWrapper,
) -> Result<Option<Box<dyn Serialize>>>;
}Expand description
The CommandDispatch trait should be implemented for all leaf structures
in the application’s command hierarchy. It can be automatically derived
on internal nodes in the heirarchy. See the documentation for
[opentitantool_derive].
The context parameter can be used to carry information from prior levels
in the command hierarchy to the next level. This is typically used to
implement parameters on interior nodes before the next layer of subcommands.