pub fn into_web_code(self) -> i16 {
        match self {
            MouseButton::Primary => 0,
            // not a typo; auxiliary and secondary are swapped unlike in the `buttons` field.
            // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button
            MouseButton::Auxiliary => 1,
            MouseButton::Secondary => 2,
            MouseButton::Fourth => 3,
            MouseButton::Fifth => 4,
            MouseButton::Unknown => -1,
        }
    }
/// Converts MouseButton into the corresponding button code
///
/// MouseButton::Unknown will get mapped to -1
Converts MouseButton into the corresponding button code
MouseButton::Unknown will get mapped to -1
Converts MouseButton into the corresponding button code MouseButton :: Unknown will get mapped to - 1
pub fn into_web_code(self) -> i16 {
        match self {
            MouseButton::Primary => 0,
            // not a typo; auxiliary and secondary are swapped unlike in the `buttons` field.
            // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button
            MouseButton::Auxiliary => 1,
            MouseButton::Secondary => 2,
            MouseButton::Fourth => 3,
            MouseButton::Fifth => 4,
            MouseButton::Unknown => -1,
        }
    }
pub fn into_web_code ( self ) -> i16 { match self { MouseButton :: Primary => 0 , // not a typo; auxiliary and secondary are swapped unlike in the `buttons` field. // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button MouseButton :: Auxiliary => 1 , MouseButton :: Secondary => 2 , MouseButton :: Fourth => 3 , MouseButton :: Fifth => 4 , MouseButton :: Unknown => - 1 , } }
Converts MouseButton into the corresponding button code
MouseButton::Unknown will get mapped to -1
Converts MouseButton into the corresponding button code MouseButton :: Unknown will get mapped to - 1
self
self