pub struct MessageObject { /* private fields */ }Expand description
A KeyValue-backed message object, as some Steam messages use.
Implementations§
Source§impl MessageObject
impl MessageObject
Sourcepub fn new() -> MessageObject
pub fn new() -> MessageObject
Creates an empty message object.
Sourcepub fn with_key_values(key_values: KeyValue) -> MessageObject
pub fn with_key_values(key_values: KeyValue) -> MessageObject
Creates a message object from the given key values.
Sourcepub fn key_values(&self) -> &KeyValue
pub fn key_values(&self) -> &KeyValue
The underlying KeyValue.
Sourcepub fn key_values_mut(&mut self) -> &mut KeyValue
pub fn key_values_mut(&mut self) -> &mut KeyValue
The underlying KeyValue, for modification.
Sourcepub fn read_from_stream(&mut self, stream: &mut dyn Read) -> bool
pub fn read_from_stream(&mut self, stream: &mut dyn Read) -> bool
Reads this message object from a stream. Returns false on failure.
Sourcepub fn write_to_stream(&self, stream: &mut dyn Write) -> Result<(), SteamError>
pub fn write_to_stream(&self, stream: &mut dyn Write) -> Result<(), SteamError>
Writes this message object to a stream.
Trait Implementations§
Source§impl Clone for MessageObject
impl Clone for MessageObject
Source§impl Debug for MessageObject
impl Debug for MessageObject
Source§impl Default for MessageObject
impl Default for MessageObject
Source§fn default() -> MessageObject
fn default() -> MessageObject
Returns the “default value” for a type. Read more
impl Eq for MessageObject
Source§impl PartialEq for MessageObject
impl PartialEq for MessageObject
impl StructuralPartialEq for MessageObject
Auto Trait Implementations§
impl Freeze for MessageObject
impl RefUnwindSafe for MessageObject
impl Send for MessageObject
impl Sync for MessageObject
impl Unpin for MessageObject
impl UnsafeUnpin for MessageObject
impl UnwindSafe for MessageObject
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.