pub trait WidgetCommandEncode {
// Required methods
fn to_wire(&self) -> (&'static str, PropValue);
fn command_specs() -> Vec<CommandSpec>
where Self: Sized;
}Expand description
Trait for types that can encode widget commands for the wire.
Mirrors crate::types::WidgetEventEncode for commands.
Typically derived via #[derive(WidgetCommand)].
Required Methods§
Sourcefn to_wire(&self) -> (&'static str, PropValue)
fn to_wire(&self) -> (&'static str, PropValue)
Encode this command to its wire representation.
Returns (family, value).
Sourcefn command_specs() -> Vec<CommandSpec>where
Self: Sized,
fn command_specs() -> Vec<CommandSpec>where
Self: Sized,
Return the specs for all command variants.