[][src]Struct websocket::sync::stream::ReadWritePair

pub struct ReadWritePair<R, W>(pub R, pub W)
where
    R: Read,
    W: Write
;

If you would like to combine an input stream and an output stream into a single stream to talk websockets over then this is the struct for you!

This is useful if you want to use different mediums for different directions.

Trait Implementations

impl<R, W> Read for ReadWritePair<R, W> where
    R: Read,
    W: Write
[src]

impl<R, W> AsyncWrite for ReadWritePair<R, W> where
    R: Read,
    W: AsyncWrite
[src]

impl<R, W> Splittable for ReadWritePair<R, W> where
    R: Read,
    W: Write
[src]

type Reader = R

The reading component of this type

type Writer = W

The writing component of this type

impl<R, W> Write for ReadWritePair<R, W> where
    R: Read,
    W: Write
[src]

impl<R, W> AsyncRead for ReadWritePair<R, W> where
    R: AsyncRead,
    W: Write
[src]

Auto Trait Implementations

impl<R, W> Send for ReadWritePair<R, W> where
    R: Send,
    W: Send

impl<R, W> Sync for ReadWritePair<R, W> where
    R: Sync,
    W: Sync

impl<R, W> Unpin for ReadWritePair<R, W> where
    R: Unpin,
    W: Unpin

impl<R, W> UnwindSafe for ReadWritePair<R, W> where
    R: UnwindSafe,
    W: UnwindSafe

impl<R, W> RefUnwindSafe for ReadWritePair<R, W> where
    R: RefUnwindSafe,
    W: RefUnwindSafe

Blanket Implementations

impl<S> IntoWs for S where
    S: Stream + Send + 'static, 
[src]

type Stream = S

The type of stream this upgrade process is working with (TcpStream, etc.)

type Error = (S, Option<Incoming<(Method, RequestUri)>>, BytesMut, HyperIntoWsError)

An error value in case the stream is not asking for a websocket connection or something went wrong. It is common to also include the stream here. Read more

impl<S> IntoWs for S where
    S: Stream
[src]

type Stream = S

The type of stream this upgrade process is working with (TcpStream, etc.)

type Error = (S, Option<Incoming<(Method, RequestUri)>>, Option<Buffer>, HyperIntoWsError)

An error value in case the stream is not asking for a websocket connection or something went wrong. It is common to also include the stream here. Read more

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

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

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<T> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<R> ReadBytesExt for R where
    R: Read + ?Sized

impl<W> WriteBytesExt for W where
    W: Write + ?Sized

impl<T> Typeable for T where
    T: Any

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

impl<S> Stream for S where
    S: Read + Write
[src]

impl<S> Stream for S where
    S: AsyncRead + AsyncWrite
[src]