pub enum MouseEventKind {
Down(MouseButton),
Up(MouseButton),
Drag(MouseButton),
Moved,
ScrollDown,
ScrollUp,
ScrollLeft,
ScrollRight,
}Expand description
Variants§
Down(MouseButton)
Pressed mouse button. Contains the button that was pressed.
Up(MouseButton)
Released mouse button. Contains the button that was released.
Drag(MouseButton)
Moved the mouse cursor while pressing the contained mouse button.
Moved
Moved the mouse cursor while not pressing a mouse button.
ScrollDown
Scrolled mouse wheel downwards (towards the user).
ScrollUp
Scrolled mouse wheel upwards (away from the user).
ScrollLeft
Scrolled mouse wheel left (mostly on a laptop touchpad).
ScrollRight
Scrolled mouse wheel right (mostly on a laptop touchpad).
Implementations§
Source§impl MouseEventKind
impl MouseEventKind
Sourcepub const fn is_down(&self) -> bool
pub const fn is_down(&self) -> bool
Returns true if this value is of type Down. Returns false otherwise
Sourcepub const fn is_up(&self) -> bool
pub const fn is_up(&self) -> bool
Returns true if this value is of type Up. Returns false otherwise
Sourcepub const fn is_drag(&self) -> bool
pub const fn is_drag(&self) -> bool
Returns true if this value is of type Drag. Returns false otherwise
Sourcepub const fn is_moved(&self) -> bool
pub const fn is_moved(&self) -> bool
Returns true if this value is of type Moved. Returns false otherwise
Sourcepub const fn is_scroll_down(&self) -> bool
pub const fn is_scroll_down(&self) -> bool
Returns true if this value is of type ScrollDown. Returns false otherwise
Sourcepub const fn is_scroll_up(&self) -> bool
pub const fn is_scroll_up(&self) -> bool
Returns true if this value is of type ScrollUp. Returns false otherwise
Sourcepub const fn is_scroll_left(&self) -> bool
pub const fn is_scroll_left(&self) -> bool
Returns true if this value is of type ScrollLeft. Returns false otherwise
Sourcepub const fn is_scroll_right(&self) -> bool
pub const fn is_scroll_right(&self) -> bool
Returns true if this value is of type ScrollRight. Returns false otherwise
Trait Implementations§
Source§impl Clone for MouseEventKind
impl Clone for MouseEventKind
Source§fn clone(&self) -> MouseEventKind
fn clone(&self) -> MouseEventKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MouseEventKind
impl Debug for MouseEventKind
Source§impl<'de> Deserialize<'de> for MouseEventKind
impl<'de> Deserialize<'de> for MouseEventKind
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<MouseEventKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<MouseEventKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Hash for MouseEventKind
impl Hash for MouseEventKind
Source§impl PartialEq for MouseEventKind
impl PartialEq for MouseEventKind
Source§impl PartialOrd for MouseEventKind
impl PartialOrd for MouseEventKind
Source§impl Serialize for MouseEventKind
impl Serialize for MouseEventKind
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Copy for MouseEventKind
impl Eq for MouseEventKind
impl StructuralPartialEq for MouseEventKind
Auto Trait Implementations§
impl Freeze for MouseEventKind
impl RefUnwindSafe for MouseEventKind
impl Send for MouseEventKind
impl Sync for MouseEventKind
impl Unpin for MouseEventKind
impl UnsafeUnpin for MouseEventKind
impl UnwindSafe for MouseEventKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
key and return true if they are equal.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>
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>
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