steam_enums/
estreaminterface.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 EStreamInterface {
6 Default = 0,
7 RecentGames = 1,
8 BigPicture = 2,
9 Desktop = 3,
10 SteamVR = 4,
11}
12
13impl EStreamInterface {
14 pub fn from_i32(val: i32) -> Option<Self> {
15 match val {
16 x if x == Self::Default as i32 => Some(Self::Default),
17 x if x == Self::RecentGames as i32 => Some(Self::RecentGames),
18 x if x == Self::BigPicture as i32 => Some(Self::BigPicture),
19 x if x == Self::Desktop as i32 => Some(Self::Desktop),
20 x if x == Self::SteamVR as i32 => Some(Self::SteamVR),
21 _ => None,
22 }
23 }
24}