[][src]Enum twilight_gateway::shard::raw_message::Message

#[non_exhaustive]pub enum Message {
    Binary(Vec<u8>),
    Close(Option<CloseFrame<'static>>),
    Ping(Vec<u8>),
    Pong(Vec<u8>),
    Text(String),
}

Message to send over the connection to the remote.

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Binary(Vec<u8>)

Binary websocket message.

Close(Option<CloseFrame<'static>>)

Close message with an optional frame including information about the reason for the close.

Ping(Vec<u8>)

Ping message with a payload.

The payload must have a length less than 125 bytes.

Pong(Vec<u8>)

Pong message with a payload.

The payload must have a length less than 125 bytes.

Text(String)

Text websocket message.

Trait Implementations

impl Clone for Message[src]

impl Debug for Message[src]

impl Eq for Message[src]

impl PartialEq<Message> for Message[src]

impl Sink<Message> for ShardSink[src]

type Error = SendError

The type of value produced by the sink when an error occurs.

impl Sink<Message> for &ShardSink[src]

type Error = SendError

The type of value produced by the sink when an error occurs.

impl StructuralEq for Message[src]

impl StructuralPartialEq for Message[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,