#[non_exhaustive]pub enum MouseKind {
Down(MouseButton),
Up(MouseButton),
Drag(MouseButton),
ScrollUp,
ScrollDown,
ScrollLeft,
ScrollRight,
Moved,
}Expand description
The type of mouse event.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Down(MouseButton)
A mouse button was pressed.
Up(MouseButton)
A mouse button was released.
Drag(MouseButton)
The mouse was moved while a button was held.
ScrollUp
The scroll wheel was rotated upward.
ScrollDown
The scroll wheel was rotated downward.
ScrollLeft
The scroll wheel was rotated leftward (horizontal scroll).
ScrollRight
The scroll wheel was rotated rightward (horizontal scroll).
Moved
The mouse was moved without any button held.
Trait Implementations§
impl Eq for MouseKind
impl StructuralPartialEq for MouseKind
Auto Trait Implementations§
impl Freeze for MouseKind
impl RefUnwindSafe for MouseKind
impl Send for MouseKind
impl Sync for MouseKind
impl Unpin for MouseKind
impl UnsafeUnpin for MouseKind
impl UnwindSafe for MouseKind
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