Skip to main content

steam_enums/
egetchannelsalgorithm.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 EGetChannelsAlgorithm {
6    Default = 1,
7    Friends = 2,
8    Featured = 3,
9    Developer = 4,
10    Following = 5,
11}
12
13impl EGetChannelsAlgorithm {
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::Friends as i32 => Some(Self::Friends),
18            x if x == Self::Featured as i32 => Some(Self::Featured),
19            x if x == Self::Developer as i32 => Some(Self::Developer),
20            x if x == Self::Following as i32 => Some(Self::Following),
21            _ => None,
22        }
23    }
24}