steam_enums/
estreamdeviceformfactor.rs1#![allow(non_camel_case_types)]
2#![allow(non_upper_case_globals)]
3#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
4#[repr(i32)]
5pub enum EStreamDeviceFormFactor {
6 Unknown = 0,
7 Phone = 1,
8 Tablet = 2,
9 Computer = 3,
10 TV = 4,
11 VRHeadset = 5,
12}
13
14impl EStreamDeviceFormFactor {
15 pub fn from_i32(val: i32) -> Option<Self> {
16 match val {
17 x if x == Self::Unknown as i32 => Some(Self::Unknown),
18 x if x == Self::Phone as i32 => Some(Self::Phone),
19 x if x == Self::Tablet as i32 => Some(Self::Tablet),
20 x if x == Self::Computer as i32 => Some(Self::Computer),
21 x if x == Self::TV as i32 => Some(Self::TV),
22 x if x == Self::VRHeadset as i32 => Some(Self::VRHeadset),
23 _ => None,
24 }
25 }
26}