pub enum InteractionPreview {
Enabled,
Hovered,
Focused,
Pressed,
Disabled,
}Expand description
One interaction state a specimen renders without live input.
Variants§
Enabled
At rest: no state layer, no ring.
Hovered
The pointer is over the control.
Focused
The control has keyboard focus: focus layer (where the live control draws one) and the focus ring.
Pressed
The control is held down.
Disabled
The control cannot be used.
Implementations§
Source§impl InteractionPreview
impl InteractionPreview
Sourcepub const fn name(self) -> &'static str
pub const fn name(self) -> &'static str
The design kit’s name for the state; galleries may use it as a column label.
pub const fn is_disabled(self) -> bool
pub const fn is_hovered(self) -> bool
pub const fn is_focused(self) -> bool
pub const fn is_pressed(self) -> bool
Sourcepub const fn layer_opacity(self) -> f32
pub const fn layer_opacity(self) -> f32
The M3 state-layer opacity for this state (0 at rest and disabled).
Trait Implementations§
Source§impl Clone for InteractionPreview
impl Clone for InteractionPreview
Source§fn clone(&self) -> InteractionPreview
fn clone(&self) -> InteractionPreview
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for InteractionPreview
Source§impl Debug for InteractionPreview
impl Debug for InteractionPreview
Source§impl Default for InteractionPreview
impl Default for InteractionPreview
Source§fn default() -> InteractionPreview
fn default() -> InteractionPreview
Returns the “default value” for a type. Read more
impl Eq for InteractionPreview
Source§impl From<InteractionPreview> for CardState
impl From<InteractionPreview> for CardState
Source§fn from(preview: InteractionPreview) -> Self
fn from(preview: InteractionPreview) -> Self
Converts to this type from the input type.
Source§impl Hash for InteractionPreview
impl Hash for InteractionPreview
Source§impl PartialEq for InteractionPreview
impl PartialEq for InteractionPreview
impl StructuralPartialEq for InteractionPreview
Auto Trait Implementations§
impl Freeze for InteractionPreview
impl RefUnwindSafe for InteractionPreview
impl Send for InteractionPreview
impl Sync for InteractionPreview
impl Unpin for InteractionPreview
impl UnsafeUnpin for InteractionPreview
impl UnwindSafe for InteractionPreview
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().