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 duplicate 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§impl PartialOrd for ElementState
impl PartialOrd for ElementState
impl 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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.