[−][src]Struct websocket::receiver::Reader
This reader bundles an existing stream with a parsing algorithm.
It is used by the client in its .split() function as the reading component.
Fields
stream: BufReader<R>
the stream to be read from
receiver: Receiver
the parser to parse bytes into messages
Methods
impl<R> Reader<R> where
R: Read, [src]
impl<R> Reader<R> where
R: Read, pub fn recv_dataframe(&mut self) -> WebSocketResult<DataFrame>[src]
pub fn recv_dataframe(&mut self) -> WebSocketResult<DataFrame>Reads a single data frame from the remote endpoint.
ⓘImportant traits for DataFrameIterator<'a, Recv, R>pub fn incoming_dataframes(
&mut self
) -> DataFrameIterator<Receiver, BufReader<R>>[src]
pub fn incoming_dataframes(
&mut self
) -> DataFrameIterator<Receiver, BufReader<R>>Returns an iterator over incoming data frames.
pub fn recv_message(&mut self) -> WebSocketResult<OwnedMessage>[src]
pub fn recv_message(&mut self) -> WebSocketResult<OwnedMessage>Reads a single message from this receiver.
ⓘImportant traits for MessageIterator<'a, Recv, R>pub fn incoming_messages<'a>(
&'a mut self
) -> MessageIterator<'a, Receiver, BufReader<R>>[src]
pub fn incoming_messages<'a>(
&'a mut self
) -> MessageIterator<'a, Receiver, BufReader<R>>An iterator over incoming messsages. This iterator will block until new messages arrive and will never halt.
impl<S> Reader<S> where
S: AsTcpStream + Stream + Read, [src]
impl<S> Reader<S> where
S: AsTcpStream + Stream + Read, pub fn shutdown(&self) -> IoResult<()>[src]
pub fn shutdown(&self) -> IoResult<()>Closes the receiver side of the connection, will cause all pending and future IO to return immediately with an appropriate value.
pub fn shutdown_all(&self) -> IoResult<()>[src]
pub fn shutdown_all(&self) -> IoResult<()>Shuts down both Sender and Receiver, will cause all pending and future IO to return immediately with an appropriate value.
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T> From for T[src]
impl<T> From for Timpl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>try_from)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut TMutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>try_from)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeId🔬 This is a nightly-only experimental API. (get_type_id)
this method will likely be replaced by an associated static
Gets the TypeId of self. Read more
impl<T> Typeable for T where
T: Any, [src]
impl<T> Typeable for T where
T: Any, impl<T> Erased for T[src]
impl<T> Erased for T