Enum jamsocket_server::MessageFromClient [−][src]
pub enum MessageFromClient {
Connect(ClientId, Recipient<MessageFromServer>),
Disconnect(ClientId),
Message {
from_client: ClientId,
data: MessageData,
},
}
Expand description
Represents a message or event initiated by a client.
Variants
Connect(ClientId, Recipient<MessageFromServer>)
A client opens a connection to the server.
Tuple Fields of Connect
0: ClientId
1: Recipient<MessageFromServer>
Disconnect(ClientId)
A client disconnects from the server (or their connection otherwise drops.)
Tuple Fields of Disconnect
0: ClientId
A client sends a message.
Fields of Message
from_client: ClientId
data: MessageData
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for MessageFromClient
impl Send for MessageFromClient
impl Sync for MessageFromClient
impl Unpin for MessageFromClient
impl !UnwindSafe for MessageFromClient
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more