steam-enums 0.1.0

Steam protocol enumerations (EResult, EMsg, EAccountType, etc.) for Rust.
Documentation
#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum ETouchGesture {
    None = 0,
    Touch = 1,
    Tap = 2,
    DoubleTap = 3,
    ShortPress = 4,
    LongPress = 5,
    LongTap = 6,
    TwoFingerTap = 7,
    TapCancelled = 8,
    PinchBegin = 9,
    PinchUpdate = 10,
    PinchEnd = 11,
    FlingStart = 12,
    FlingCancelled = 13,
}

impl ETouchGesture {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::None as i32 => Some(Self::None),
            x if x == Self::Touch as i32 => Some(Self::Touch),
            x if x == Self::Tap as i32 => Some(Self::Tap),
            x if x == Self::DoubleTap as i32 => Some(Self::DoubleTap),
            x if x == Self::ShortPress as i32 => Some(Self::ShortPress),
            x if x == Self::LongPress as i32 => Some(Self::LongPress),
            x if x == Self::LongTap as i32 => Some(Self::LongTap),
            x if x == Self::TwoFingerTap as i32 => Some(Self::TwoFingerTap),
            x if x == Self::TapCancelled as i32 => Some(Self::TapCancelled),
            x if x == Self::PinchBegin as i32 => Some(Self::PinchBegin),
            x if x == Self::PinchUpdate as i32 => Some(Self::PinchUpdate),
            x if x == Self::PinchEnd as i32 => Some(Self::PinchEnd),
            x if x == Self::FlingStart as i32 => Some(Self::FlingStart),
            x if x == Self::FlingCancelled as i32 => Some(Self::FlingCancelled),
            _ => None,
        }
    }
}