[][src]Trait websocket::ws::receiver::Receiver

pub trait Receiver: Sized {
    type F: DataFrame;
    type M: Message;
    fn recv_dataframe<R>(&mut self, reader: &mut R) -> WebSocketResult<Self::F>
    where
        R: Read
;
fn recv_message_dataframes<R>(
        &mut self,
        reader: &mut R
    ) -> WebSocketResult<Vec<Self::F>>
    where
        R: Read
; fn incoming_dataframes<'a, R>(
        &'a mut self,
        reader: &'a mut R
    ) -> DataFrameIterator<'a, Self, R>
    where
        R: Read
, { ... }
fn recv_message<R>(&mut self, reader: &mut R) -> WebSocketResult<Self::M>
    where
        R: Read
, { ... }
fn incoming_messages<'a, R>(
        &'a mut self,
        reader: &'a mut R
    ) -> MessageIterator<'a, Self, R>
    where
        R: Read
, { ... } }

A trait for receiving data frames and messages.

Associated Types

The type of dataframe that incoming messages will be serialized to.

The type of message that incoming messages will be serialized to.

Required Methods

Reads a single data frame from this receiver.

Returns the data frames that constitute one message.

Provided Methods

Important traits for DataFrameIterator<'a, Recv, R>

Returns an iterator over incoming data frames.

Reads a single message from this receiver.

Important traits for MessageIterator<'a, Recv, R>

Returns an iterator over incoming messages.

Implementors

impl Receiver for Receiver
[src]

Reads a single data frame from the remote endpoint.

Returns the data frames that constitute one message.

Important traits for DataFrameIterator<'a, Recv, R>

Important traits for MessageIterator<'a, Recv, R>