Skip to main content

steam_enums/
egetgamesalgorithm.rs

1#![allow(non_camel_case_types)]
2#![allow(non_upper_case_globals)]
3#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
4#[repr(i32)]
5pub enum EGetGamesAlgorithm {
6    Default = 1,
7    MostPlayed = 2,
8    PopularNew = 3,
9}
10
11impl EGetGamesAlgorithm {
12    pub fn from_i32(val: i32) -> Option<Self> {
13        match val {
14            x if x == Self::Default as i32 => Some(Self::Default),
15            x if x == Self::MostPlayed as i32 => Some(Self::MostPlayed),
16            x if x == Self::PopularNew as i32 => Some(Self::PopularNew),
17            _ => None,
18        }
19    }
20}