Enum show_image::event::ElementState
source · [−]pub enum ElementState {
Pressed,
Released,
}
Expand description
State of a button or key.
Variants
Pressed
The button or key is pressed.
Released
The button or key is released.
Implementations
sourceimpl ElementState
impl ElementState
sourcepub fn is_pressed(self) -> bool
pub fn is_pressed(self) -> bool
Check if the button or key is pressed.
sourcepub fn is_released(self) -> bool
pub fn is_released(self) -> bool
Check if the button or key is released.
Trait Implementations
sourceimpl Clone for ElementState
impl Clone for ElementState
sourcefn clone(&self) -> ElementState
fn clone(&self) -> ElementState
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ElementState
impl Debug for ElementState
sourceimpl From<ElementState> for ElementState
impl From<ElementState> for ElementState
sourcefn from(other: ElementState) -> Self
fn from(other: ElementState) -> Self
Converts to this type from the input type.
sourceimpl Hash for ElementState
impl Hash for ElementState
sourceimpl Ord for ElementState
impl Ord for ElementState
sourcefn cmp(&self, other: &ElementState) -> Ordering
fn cmp(&self, other: &ElementState) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<ElementState> for ElementState
impl PartialEq<ElementState> for ElementState
sourcefn eq(&self, other: &ElementState) -> bool
fn eq(&self, other: &ElementState) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl PartialOrd<ElementState> for ElementState
impl PartialOrd<ElementState> for ElementState
sourcefn partial_cmp(&self, other: &ElementState) -> Option<Ordering>
fn partial_cmp(&self, other: &ElementState) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for ElementState
impl Eq for ElementState
impl StructuralEq for ElementState
impl StructuralPartialEq for ElementState
Auto Trait Implementations
impl RefUnwindSafe for ElementState
impl Send for ElementState
impl Sync for ElementState
impl Unpin for ElementState
impl UnwindSafe for ElementState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.