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§
Sourcefn is_selected(&self) -> bool
fn is_selected(&self) -> bool
Returns true if the element is selected.
Provided Methods§
Sourcefn secondary_selected(self, _: bool) -> Self
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.