Struct suzy::selectable::SelectionState [−][src]
A selection state is an opaque type which indicates the current state a selectable widget should transition to.
In order to account for potential future selection states, this type primarily provides “versioned” conversions, in increasing order of complexity. Matching on a versioned type means that if a future state is added, it can “fall back” to a similar state of the version the match already handles.
Implementations
impl SelectionState
[src]
pub const fn normal() -> Self
[src]
Normal selection state
pub const fn hover() -> Self
[src]
Hover selection state
pub const fn focus() -> Self
[src]
Focus selection state
pub const fn pressed() -> Self
[src]
Pressed selection state
pub const fn active() -> Self
[src]
Active selection state
pub fn v0(self) -> SelectionStateV0
[src]
Get version 0 selection states.
pub fn v1(self) -> SelectionStateV1
[src]
Get version 1 selection states.
pub fn v2(self) -> SelectionStateV2
[src]
Get version 2 selection states.
pub fn reduce(self) -> Self
[src]
Reduce the selection state to a resonable fallback assumed to be more widely implemented.
Trait Implementations
impl Clone for SelectionState
[src]
fn clone(&self) -> SelectionState
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for SelectionState
[src]
impl Debug for SelectionState
[src]
impl Default for SelectionState
[src]
fn default() -> SelectionState
[src]
impl Eq for SelectionState
[src]
impl From<SelectionState> for SelectionStateV0
[src]
fn from(all: SelectionState) -> Self
[src]
impl From<SelectionState> for SelectionStateV1
[src]
fn from(all: SelectionState) -> Self
[src]
impl From<SelectionState> for SelectionStateV2
[src]
fn from(all: SelectionState) -> Self
[src]
impl Hash for SelectionState
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<SelectionState> for SelectionState
[src]
fn eq(&self, other: &SelectionState) -> bool
[src]
fn ne(&self, other: &SelectionState) -> bool
[src]
impl StructuralEq for SelectionState
[src]
impl StructuralPartialEq for SelectionState
[src]
Auto Trait Implementations
impl RefUnwindSafe for SelectionState
impl Send for SelectionState
impl Sync for SelectionState
impl Unpin for SelectionState
impl UnwindSafe for SelectionState
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,