Enum stateroom::MessageRecipient
source · [−]pub enum MessageRecipient {
Broadcast,
Client(ClientId),
}Expand description
Represents the recipient(s) of a message.
Messages may either be sent to a particular client by numeric id
(MessageRecipient::Client(3)), or be broadcast to all connected clients
(MessageRecipient::Broadcast).]
Variants
Broadcast
Client(ClientId)
Implementations
sourceimpl MessageRecipient
impl MessageRecipient
pub fn encode_u32(&self) -> u32
pub fn decode_u32(enc_client_id: u32) -> Self
Trait Implementations
sourceimpl Clone for MessageRecipient
impl Clone for MessageRecipient
sourcefn clone(&self) -> MessageRecipient
fn clone(&self) -> MessageRecipient
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for MessageRecipient
impl Debug for MessageRecipient
sourceimpl From<ClientId> for MessageRecipient
impl From<ClientId> for MessageRecipient
sourceimpl PartialEq<MessageRecipient> for MessageRecipient
impl PartialEq<MessageRecipient> for MessageRecipient
sourcefn eq(&self, other: &MessageRecipient) -> bool
fn eq(&self, other: &MessageRecipient) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &MessageRecipient) -> bool
fn ne(&self, other: &MessageRecipient) -> bool
This method tests for !=.
impl StructuralPartialEq for MessageRecipient
Auto Trait Implementations
impl RefUnwindSafe for MessageRecipient
impl Send for MessageRecipient
impl Sync for MessageRecipient
impl Unpin for MessageRecipient
impl UnwindSafe for MessageRecipient
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more