zng_wgt_toggle

Trait SelectorImpl

Source
pub trait SelectorImpl: Send + 'static {
    // Required methods
    fn subscribe(&self);
    fn select(
        &mut self,
        value: Box<dyn AnyVarValue>,
    ) -> Result<(), SelectorError>;
    fn deselect(&mut self, value: &dyn AnyVarValue) -> Result<(), SelectorError>;
    fn is_selected(&self, value: &dyn AnyVarValue) -> bool;
}
Expand description

Represents a Selector implementation.

Required Methods§

Source

fn subscribe(&self)

Add the selector subscriptions in the WIDGET.

Source

fn select(&mut self, value: Box<dyn AnyVarValue>) -> Result<(), SelectorError>

Insert the value in the selection, returns Ok(()) if the value was inserted or was already selected.

Source

fn deselect(&mut self, value: &dyn AnyVarValue) -> Result<(), SelectorError>

Remove the value from the selection, returns Ok(()) if the value was removed or was not selected.

Source

fn is_selected(&self, value: &dyn AnyVarValue) -> bool

Returns true if the value is selected.

Implementors§