#[repr(u8)]pub enum MouseButton {
None = 0,
Left = 1,
Right = 2,
Middle = 3,
X1 = 4,
X2 = 5,
}
Expand description
An indicator of which mouse button was pressed.
Variants§
None = 0
No mouse button.
Left = 1
Left mouse button.
Right = 2
Right mouse button.
Middle = 3
Middle mouse button.
X1 = 4
First X button.
X2 = 5
Second X button.
Implementations§
Source§impl MouseButton
impl MouseButton
Sourcepub fn is_left(self) -> bool
pub fn is_left(self) -> bool
Returns true
if this is MouseButton::Left
.
Sourcepub fn is_right(self) -> bool
pub fn is_right(self) -> bool
Returns true
if this is MouseButton::Right
.
Sourcepub fn is_middle(self) -> bool
pub fn is_middle(self) -> bool
Returns true
if this is MouseButton::Middle
.
Sourcepub fn is_x1(self) -> bool
pub fn is_x1(self) -> bool
Returns true
if this is MouseButton::X1
.
Sourcepub fn is_x2(self) -> bool
pub fn is_x2(self) -> bool
Returns true
if this is MouseButton::X2
.
Trait Implementations§
Source§impl Clone for MouseButton
impl Clone for MouseButton
Source§fn clone(&self) -> MouseButton
fn clone(&self) -> MouseButton
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 MouseButton
impl Debug for MouseButton
Source§impl PartialEq for MouseButton
impl PartialEq for MouseButton
impl Copy for MouseButton
impl Eq 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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
Source§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.