Enum dioxus_html::input_data::MouseButton
source · pub enum MouseButton {
Primary,
Secondary,
Auxiliary,
Fourth,
Fifth,
Unknown,
}
Expand description
A mouse button type (such as Primary/Secondary)
Variants§
Primary
Primary button (typically the left button)
Secondary
Secondary button (typically the right button)
Auxiliary
Auxiliary button (typically the middle button)
Fourth
Fourth button (typically the “Browser Back” button)
Fifth
Fifth button (typically the “Browser Forward” button)
Unknown
A button with an unknown code
Implementations§
source§impl MouseButton
impl MouseButton
sourcepub fn from_web_code(code: i16) -> Self
pub fn from_web_code(code: i16) -> Self
Constructs a MouseButton for the specified button code
E.g. 0 => Primary; 1 => Auxiliary
Unknown codes get mapped to MouseButton::Unknown.
sourcepub fn into_web_code(self) -> i16
pub fn into_web_code(self) -> i16
Converts MouseButton into the corresponding button code
MouseButton::Unknown will get mapped to -1
Trait Implementations§
source§impl<O: Into<EnumSet<MouseButton>>> BitAnd<O> for MouseButton
impl<O: Into<EnumSet<MouseButton>>> BitAnd<O> for MouseButton
source§impl<O: Into<EnumSet<MouseButton>>> BitOr<O> for MouseButton
impl<O: Into<EnumSet<MouseButton>>> BitOr<O> for MouseButton
source§impl<O: Into<EnumSet<MouseButton>>> BitXor<O> for MouseButton
impl<O: Into<EnumSet<MouseButton>>> BitXor<O> for MouseButton
source§impl Clone for MouseButton
impl Clone for MouseButton
source§impl Debug for MouseButton
impl Debug for MouseButton
source§impl<'de> Deserialize<'de> for MouseButton
impl<'de> Deserialize<'de> for MouseButton
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl EnumSetTypePrivate for MouseButton
impl EnumSetTypePrivate for MouseButton
source§const ALL_BITS: Self::Repr = {transmute(0x3f): <input_data::MouseButton as enumset::__internal::EnumSetTypePrivate>::Repr}
const ALL_BITS: Self::Repr = {transmute(0x3f): <input_data::MouseButton as enumset::__internal::EnumSetTypePrivate>::Repr}
A mask of bits that are valid in the bitset.
source§const VARIANT_COUNT: u32 = 6u32
const VARIANT_COUNT: u32 = 6u32
The number of variants in the bitset.
source§fn enum_into_u32(self) -> u32
fn enum_into_u32(self) -> u32
Converts an enum of this type into its bit position.
source§unsafe fn enum_from_u32(val: u32) -> Self
unsafe fn enum_from_u32(val: u32) -> Self
Converts a bit position into an enum value.
source§impl Not for MouseButton
impl Not for MouseButton
source§impl PartialEq<EnumSet<MouseButton>> for MouseButton
impl PartialEq<EnumSet<MouseButton>> for MouseButton
source§impl PartialEq<MouseButton> for MouseButton
impl PartialEq<MouseButton> for MouseButton
source§impl Serialize for MouseButton
impl Serialize for MouseButton
source§impl<O: Into<EnumSet<MouseButton>>> Sub<O> for MouseButton
impl<O: Into<EnumSet<MouseButton>>> Sub<O> for MouseButton
impl Copy for MouseButton
impl EnumSetType for MouseButton
impl Eq for MouseButton
Auto Trait Implementations§
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