Skip to main content

WidgetCommandEncode

Trait WidgetCommandEncode 

Source
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§

Source

fn to_wire(&self) -> (&'static str, PropValue)

Encode this command to its wire representation.

Returns (family, value).

Source

fn command_specs() -> Vec<CommandSpec>
where Self: Sized,

Return the specs for all command variants.

Implementors§