zng_wgt

Trait CommandIconExt

Source
pub trait CommandIconExt {
    // Required methods
    fn icon(self) -> CommandMetaVar<WidgetFn<()>>;
    fn init_icon(self, icon: WidgetFn<()>) -> Self;
}
Expand description

Adds the icon command metadata.

The value is an WidgetFn<()> that can generate any icon widget, the ICONS service is recommended.

Required Methods§

Source

fn icon(self) -> CommandMetaVar<WidgetFn<()>>

Gets a read-write variable that is the icon for the command.

Source

fn init_icon(self, icon: WidgetFn<()>) -> Self

Sets the initial icon if it is not set.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl CommandIconExt for Command

Source§

fn icon(self) -> CommandMetaVar<WidgetFn<()>>

Source§

fn init_icon(self, icon: WidgetFn<()>) -> Self

Implementors§