Enum simple_websockets::Event[][src]

pub enum Event {
    Connect(u64Responder),
    Disconnect(u64),
    Message(u64Message),
}
Expand description

An incoming event from a client. This can be an incoming message, a new client connection, or a disconnection.

Variants

Connect(u64Responder)

A new client has connected.

Tuple Fields of Connect

0: u64

id of the client who connected

1: Responder

Responder used to send messages back to this client

Disconnect(u64)

A client has disconnected.

Tuple Fields of Disconnect

0: u64

id of the client who disconnected

Message(u64Message)

An incoming message from a client.

Tuple Fields of Message

0: u64

id of the client who sent the message

1: Message

the message

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.