pub enum SteamEvent {
Auth(AuthEvent),
Connection(ConnectionEvent),
Friends(FriendsEvent),
Chat(ChatEvent),
Apps(AppsEvent),
CSGO(CSGOEvent),
Content(ContentEvent),
Account(AccountEvent),
Notifications(NotificationsEvent),
System(SystemEvent),
}Expand description
Steam client events, categorized by domain.
§Example
ⓘ
match event {
SteamEvent::Auth(auth) => match auth {
AuthEvent::LoggedOn { steam_id } => println!("Logged in as {}", steam_id),
AuthEvent::LoggedOff { result } => println!("Logged off: {:?}", result),
_ => {}
},
SteamEvent::Chat(chat) => match chat {
ChatEvent::FriendMessage { sender, message, .. } => {
println!("{}: {}", sender, message);
}
_ => {}
},
// Ignore other categories
_ => {}
}Variants§
Auth(AuthEvent)
Authentication events (login, logout, tokens).
Connection(ConnectionEvent)
Connection lifecycle (connect, disconnect, reconnect).
Friends(FriendsEvent)
Friends and social (friends list, personas).
Chat(ChatEvent)
Chat and messaging (friend messages, typing).
Apps(AppsEvent)
Apps and games (licenses, product info, GC).
CSGO(CSGOEvent)
CS:GO specific events.
Content(ContentEvent)
Content delivery (rich presence).
Account(AccountEvent)
Account events (email, limitations, wallet, VAC).
Notifications(NotificationsEvent)
Notification events (trade offers, messages, items).
System(SystemEvent)
System events (debug, errors).
Implementations§
Source§impl SteamEvent
impl SteamEvent
Sourcepub fn is_connection(&self) -> bool
pub fn is_connection(&self) -> bool
Check if this is a connection event.
Sourcepub fn is_friends(&self) -> bool
pub fn is_friends(&self) -> bool
Check if this is a friends event.
Sourcepub fn is_content(&self) -> bool
pub fn is_content(&self) -> bool
Check if this is a content event.
Sourcepub fn is_account(&self) -> bool
pub fn is_account(&self) -> bool
Check if this is an account event.
Sourcepub fn is_notifications(&self) -> bool
pub fn is_notifications(&self) -> bool
Check if this is a notifications event.
Sourcepub fn chat_sender(&self) -> Option<SteamID>
pub fn chat_sender(&self) -> Option<SteamID>
Get the sender SteamID if this is a chat message.
Trait Implementations§
Source§impl Clone for SteamEvent
impl Clone for SteamEvent
Source§fn clone(&self) -> SteamEvent
fn clone(&self) -> SteamEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SteamEvent
impl RefUnwindSafe for SteamEvent
impl Send for SteamEvent
impl Sync for SteamEvent
impl Unpin for SteamEvent
impl UnsafeUnpin for SteamEvent
impl UnwindSafe for SteamEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more