steam_enums/
egcbaseclientmsg.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 EGCBaseClientMsg {
6 ClientWelcome = 4004,
7 ServerWelcome = 4005,
8 ClientHello = 4006,
9 ServerHello = 4007,
10 ClientConnectionStatus = 4009,
11 ServerConnectionStatus = 4010,
12 ClientHelloPartner = 4011,
13 ClientHelloPW = 4012,
14 ClientHelloR2 = 4013,
15 ClientHelloR3 = 4014,
16 ClientHelloR4 = 4015,
17}
18
19impl EGCBaseClientMsg {
20 pub fn from_i32(val: i32) -> Option<Self> {
21 match val {
22 x if x == Self::ClientWelcome as i32 => Some(Self::ClientWelcome),
23 x if x == Self::ServerWelcome as i32 => Some(Self::ServerWelcome),
24 x if x == Self::ClientHello as i32 => Some(Self::ClientHello),
25 x if x == Self::ServerHello as i32 => Some(Self::ServerHello),
26 x if x == Self::ClientConnectionStatus as i32 => Some(Self::ClientConnectionStatus),
27 x if x == Self::ServerConnectionStatus as i32 => Some(Self::ServerConnectionStatus),
28 x if x == Self::ClientHelloPartner as i32 => Some(Self::ClientHelloPartner),
29 x if x == Self::ClientHelloPW as i32 => Some(Self::ClientHelloPW),
30 x if x == Self::ClientHelloR2 as i32 => Some(Self::ClientHelloR2),
31 x if x == Self::ClientHelloR3 as i32 => Some(Self::ClientHelloR3),
32 x if x == Self::ClientHelloR4 as i32 => Some(Self::ClientHelloR4),
33 _ => None,
34 }
35 }
36}