pub struct MessageHandler;Expand description
Message handler that decodes and dispatches Steam messages.
Implementations§
Source§impl MessageHandler
impl MessageHandler
Sourcepub fn decode_message(data: &[u8]) -> Vec<SteamEvent>
pub fn decode_message(data: &[u8]) -> Vec<SteamEvent>
Decode a raw message and return events.
For Multi messages, this returns multiple events from the contained sub-messages.
Sourcepub fn decode_packet(data: &[u8]) -> Vec<DecodedMessage>
pub fn decode_packet(data: &[u8]) -> Vec<DecodedMessage>
Decode a raw packet and return a list of decoded messages.
This handles both single messages and Multi messages (which expand into
multiple messages). Each returned DecodedMessage preserves its own
events and job ID target.
Sourcepub fn decode_message_with_job(data: &[u8]) -> DecodedMessage
pub fn decode_message_with_job(data: &[u8]) -> DecodedMessage
Legacy alias for decode_packet, kept for compatibility if needed but returns single struct (incorrect for Multi).
Deprecated: Use decode_packet instead.
Sourcepub fn decode_single(data: &[u8]) -> Option<SteamEvent>
pub fn decode_single(data: &[u8]) -> Option<SteamEvent>
Decode a single message and return a single event (legacy API).
Auto Trait Implementations§
impl Freeze for MessageHandler
impl RefUnwindSafe for MessageHandler
impl Send for MessageHandler
impl Sync for MessageHandler
impl Unpin for MessageHandler
impl UnsafeUnpin for MessageHandler
impl UnwindSafe for MessageHandler
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> 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