pub trait SelectorImpl: Send + 'static {
// Required methods
fn subscribe(&self);
fn select(&mut self, value: BoxAnyVarValue) -> Result<(), SelectorError>;
fn deselect(
&mut self,
value: &(dyn AnyVarValue + 'static),
) -> Result<(), SelectorError>;
fn is_selected(&self, value: &(dyn AnyVarValue + 'static)) -> bool;
}Expand description
Represents a Selector implementation.
Required Methods§
Sourcefn select(&mut self, value: BoxAnyVarValue) -> Result<(), SelectorError>
fn select(&mut self, value: BoxAnyVarValue) -> Result<(), SelectorError>
Insert the value in the selection, returns Ok(()) if the value was inserted or was already selected.
Sourcefn deselect(
&mut self,
value: &(dyn AnyVarValue + 'static),
) -> Result<(), SelectorError>
fn deselect( &mut self, value: &(dyn AnyVarValue + 'static), ) -> Result<(), SelectorError>
Remove the value from the selection, returns Ok(()) if the value was removed or was not selected.
Sourcefn is_selected(&self, value: &(dyn AnyVarValue + 'static)) -> bool
fn is_selected(&self, value: &(dyn AnyVarValue + 'static)) -> bool
Returns true if the value is selected.