Struct suzy::selectable::SelectionState[][src]

pub struct SelectionState(_);

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]

impl Copy for SelectionState[src]

impl Debug for SelectionState[src]

impl Default for SelectionState[src]

impl Eq for SelectionState[src]

impl From<SelectionState> for SelectionStateV0[src]

impl From<SelectionState> for SelectionStateV1[src]

impl From<SelectionState> for SelectionStateV2[src]

impl Hash for SelectionState[src]

impl PartialEq<SelectionState> for SelectionState[src]

impl StructuralEq for SelectionState[src]

impl StructuralPartialEq for SelectionState[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.