pub enum MouseButton {
Left,
Middle,
Right,
Other(i16),
}Expand description
DOM MouseEvent.button mapping.
DOM terminology calls button 1 (the middle/wheel button) the
“auxiliary button”; our MouseButton::Middle variant carries
that. Buttons 3+ (typically browser back/forward, then
vendor-defined) fall into MouseButton::Other.
Spec: https://www.w3.org/TR/uievents/#dom-mouseevent-button.
Variants§
Left
Primary button (numeric value 0). Usually the left button,
or the un-initialized state for events that don’t carry a
button press.
Middle
Auxiliary button (numeric value 1). Usually the
middle / wheel button.
Right
Secondary button (numeric value 2). Usually the right
button.
Other(i16)
Buttons 3 and above. Typically browser back (3) and browser forward (4); 5+ is vendor-defined.
Trait Implementations§
Source§impl Clone for MouseButton
impl Clone for MouseButton
impl Copy for MouseButton
Source§impl Debug for MouseButton
impl Debug for MouseButton
impl Eq for MouseButton
Source§impl Hash for MouseButton
impl Hash for MouseButton
Source§impl PartialEq for MouseButton
impl PartialEq for MouseButton
impl StructuralPartialEq for MouseButton
Auto Trait Implementations§
impl Freeze for MouseButton
impl RefUnwindSafe for MouseButton
impl Send for MouseButton
impl Sync for MouseButton
impl Unpin for MouseButton
impl UnsafeUnpin for MouseButton
impl UnwindSafe for MouseButton
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