Struct websocket::receiver::Receiver [−][src]
A Receiver that wraps a Reader and provides a default implementation using DataFrames and Messages.
Implementations
impl Receiver
[src]
Trait Implementations
impl Receiver for Receiver
[src]
type F = DataFrame
The type of dataframe that incoming messages will be serialized to.
type M = OwnedMessage
The type of message that incoming messages will be serialized to.
fn recv_dataframe<R>(&mut self, reader: &mut R) -> WebSocketResult<DataFrame> where
R: Read,
[src]
R: Read,
Reads a single data frame from the remote endpoint.
fn recv_message_dataframes<R>(
&mut self,
reader: &mut R
) -> WebSocketResult<Vec<DataFrame>> where
R: Read,
[src]
&mut self,
reader: &mut R
) -> WebSocketResult<Vec<DataFrame>> where
R: Read,
Returns the data frames that constitute one message.
pub fn incoming_dataframes<R>(
&'a mut self,
reader: &'a mut R
) -> DataFrameIterator<'a, Self, R>ⓘNotable traits for DataFrameIterator<'a, Recv, R>
impl<'a, Recv, R> Iterator for DataFrameIterator<'a, Recv, R> where
R: Read,
Recv: 'a + Receiver, type Item = Result<<Recv as Receiver>::F, WebSocketError>;
where
R: Read,
[src]
&'a mut self,
reader: &'a mut R
) -> DataFrameIterator<'a, Self, R>ⓘ
Notable traits for DataFrameIterator<'a, Recv, R>
impl<'a, Recv, R> Iterator for DataFrameIterator<'a, Recv, R> where
R: Read,
Recv: 'a + Receiver, type Item = Result<<Recv as Receiver>::F, WebSocketError>;
R: Read,
pub fn recv_message<R>(
&mut self,
reader: &mut R
) -> Result<Self::M, WebSocketError> where
R: Read,
[src]
&mut self,
reader: &mut R
) -> Result<Self::M, WebSocketError> where
R: Read,
pub fn incoming_messages<R>(
&'a mut self,
reader: &'a mut R
) -> MessageIterator<'a, Self, R>ⓘNotable traits for MessageIterator<'a, Recv, R>
impl<'a, Recv, R> Iterator for MessageIterator<'a, Recv, R> where
R: Read,
Recv: 'a + Receiver, type Item = Result<<Recv as Receiver>::M, WebSocketError>;
where
R: Read,
[src]
&'a mut self,
reader: &'a mut R
) -> MessageIterator<'a, Self, R>ⓘ
Notable traits for MessageIterator<'a, Recv, R>
impl<'a, Recv, R> Iterator for MessageIterator<'a, Recv, R> where
R: Read,
Recv: 'a + Receiver, type Item = Result<<Recv as Receiver>::M, WebSocketError>;
R: Read,
Auto Trait Implementations
impl RefUnwindSafe for Receiver
impl Send for Receiver
impl Sync for Receiver
impl Unpin for Receiver
impl UnwindSafe for Receiver
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
T: Any,