#[repr(i32)]pub enum MouseButton {
Button1 = 0,
Button2 = 1,
Button3 = 2,
Button4 = 3,
Button5 = 4,
Button6 = 5,
Button7 = 6,
Button8 = 7,
}Expand description
Mouse buttons. The MouseButtonLeft, MouseButtonRight, and
MouseButtonMiddle aliases are supplied for convenience.
Variants§
Button1 = 0
The left mouse button. A MouseButtonLeft alias is provided to improve clarity.
Button2 = 1
The right mouse button. A MouseButtonRight alias is provided to improve clarity.
Button3 = 2
The middle mouse button. A MouseButtonMiddle alias is provided to improve clarity.
Button4 = 3
Button5 = 4
Button6 = 5
Button7 = 6
Button8 = 7
Implementations§
Source§impl MouseButton
impl MouseButton
Sourcepub const Left: Self = MouseButton::Button1
pub const Left: Self = MouseButton::Button1
Alias to MouseButton1, supplied for improved clarity.
Sourcepub const Right: Self = MouseButton::Button2
pub const Right: Self = MouseButton::Button2
Alias to MouseButton2, supplied for improved clarity.
Sourcepub const Middle: Self = MouseButton::Button3
pub const Middle: Self = MouseButton::Button3
Alias to MouseButton3, supplied for improved clarity.
Sourcepub fn from_i32(n: i32) -> Option<MouseButton>
pub fn from_i32(n: i32) -> Option<MouseButton>
Converts from i32.
Trait Implementations§
Source§impl Clone for MouseButton
impl Clone for MouseButton
Source§fn clone(&self) -> MouseButton
fn clone(&self) -> MouseButton
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 MouseButton
impl Debug for MouseButton
Source§impl Hash for MouseButton
impl Hash for MouseButton
Source§impl Ord for MouseButton
impl Ord for MouseButton
Source§fn cmp(&self, other: &MouseButton) -> Ordering
fn cmp(&self, other: &MouseButton) -> 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 MouseButton
impl PartialEq for MouseButton
Source§impl PartialOrd for MouseButton
impl PartialOrd 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> 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>
Converts
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>
Converts
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