Skip to main content

steam_enums/
echatroomservermsg.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 EChatRoomServerMsg {
6    Invalid = 0,
7    RenameChatRoom = 1,
8    Joined = 2,
9    Parted = 3,
10    Kicked = 4,
11    Invited = 5,
12    InviteDismissed = 8,
13    ChatRoomTaglineChanged = 9,
14    ChatRoomAvatarChanged = 10,
15    AppCustom = 11,
16}
17
18impl EChatRoomServerMsg {
19    pub fn from_i32(val: i32) -> Option<Self> {
20        match val {
21            x if x == Self::Invalid as i32 => Some(Self::Invalid),
22            x if x == Self::RenameChatRoom as i32 => Some(Self::RenameChatRoom),
23            x if x == Self::Joined as i32 => Some(Self::Joined),
24            x if x == Self::Parted as i32 => Some(Self::Parted),
25            x if x == Self::Kicked as i32 => Some(Self::Kicked),
26            x if x == Self::Invited as i32 => Some(Self::Invited),
27            x if x == Self::InviteDismissed as i32 => Some(Self::InviteDismissed),
28            x if x == Self::ChatRoomTaglineChanged as i32 => Some(Self::ChatRoomTaglineChanged),
29            x if x == Self::ChatRoomAvatarChanged as i32 => Some(Self::ChatRoomAvatarChanged),
30            x if x == Self::AppCustom as i32 => Some(Self::AppCustom),
31            _ => None,
32        }
33    }
34}