[][src]Struct websocket_lite::MessageCodec

pub struct MessageCodec { /* fields omitted */ }

Tokio codec for WebSocket messages. This codec can send and receive Message structs.

Implementations

impl MessageCodec[src]

pub fn client() -> MessageCodec[src]

Creates a MessageCodec for a client.

Encoded messages are masked.

pub fn server() -> MessageCodec[src]

Creates a MessageCodec for a server.

Encoded messages are not masked.

pub fn with_masked_encode(use_mask: bool) -> MessageCodec[src]

Creates a MessageCodec while specifying whether to use message masking while encoding.

Trait Implementations

impl Clone for MessageCodec[src]

impl Decoder for MessageCodec[src]

type Item = Message

The type of decoded frames.

type Error = Box<dyn Error + 'static + Sync + Send>

The type of unrecoverable frame decoding errors. Read more

impl Encoder<Message> for MessageCodec[src]

type Error = Box<dyn Error + 'static + Sync + Send>

The type of encoding errors. Read more

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<T> From<T> for T[src]

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

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>,