Selectable

Trait Selectable 

Source
pub trait Selectable: Sized {
    // Required methods
    fn selected(self, selected: bool) -> Self;
    fn is_selected(&self) -> bool;

    // Provided method
    fn secondary_selected(self, _: bool) -> Self { ... }
}
Expand description

A trait for defining element that can be selected.

Required Methods§

Source

fn selected(self, selected: bool) -> Self

Set the selected state of the element.

Source

fn is_selected(&self) -> bool

Returns true if the element is selected.

Provided Methods§

Source

fn secondary_selected(self, _: bool) -> Self

Set is the element mouse right clicked, default do nothing.

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.

Implementors§