Enum show_image::event::ElementState
source · pub enum ElementState {
Pressed,
Released,
}
Expand description
State of a button or key.
Variants§
Implementations§
source§impl 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§
source§impl Clone for ElementState
impl Clone for ElementState
source§fn clone(&self) -> ElementState
fn clone(&self) -> ElementState
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ElementState
impl Debug for ElementState
source§impl From<ElementState> for ElementState
impl From<ElementState> for ElementState
source§fn from(other: ElementState) -> Self
fn from(other: ElementState) -> Self
Converts to this type from the input type.
source§impl Hash for ElementState
impl Hash for ElementState
source§impl Ord for ElementState
impl Ord for ElementState
source§fn cmp(&self, other: &ElementState) -> Ordering
fn cmp(&self, other: &ElementState) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for ElementState
impl PartialEq for ElementState
source§fn 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 ==
.source§impl PartialOrd for ElementState
impl PartialOrd for ElementState
source§fn partial_cmp(&self, other: &ElementState) -> Option<Ordering>
fn partial_cmp(&self, other: &ElementState) -> Option<Ordering>
1.0.0 · source§fn 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 moreimpl Copy for ElementState
impl Eq for ElementState
impl StructuralPartialEq for ElementState
Auto Trait Implementations§
impl Freeze for ElementState
impl RefUnwindSafe for ElementState
impl Send for ElementState
impl Sync for ElementState
impl Unpin for ElementState
impl UnwindSafe for ElementState
Blanket Implementations§
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
source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.