Trait zng::icon::CommandIconExt

source ·
pub trait CommandIconExt {
    // Required methods
    fn icon(self) -> Box<dyn VarBoxed<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) -> Box<dyn VarBoxed<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.

Object Safety§

This trait is not object safe.

Implementors§