pub type WebSocketReceiver = SplitStream<WebSocketStream<TcpStream>>;
Expand description

WebSocket stream receiver for receiving tungstenite::Message. This stream object must have a mutable reference and can not be cloned.

Aliased Type§

struct WebSocketReceiver(/* private fields */);

Implementations

source§

impl<S> SplitStream<S>
where S: Unpin,

source

pub fn reunite<Item>( self, other: SplitSink<S, Item> ) -> Result<S, ReuniteError<S, Item>>
where S: Sink<Item>,

Attempts to put the two “halves” of a split Stream + Sink back together. Succeeds only if the SplitStream<S> and SplitSink<S> are a matching pair originating from the same call to StreamExt::split.

Trait Implementations

source§

impl<S> Unpin for SplitStream<S>

source§

impl<S> Debug for SplitStream<S>
where S: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<S> Stream for SplitStream<S>
where S: Stream,

§

type Item = <S as Stream>::Item

Values yielded by the stream.
source§

fn poll_next( self: Pin<&mut SplitStream<S>>, cx: &mut Context<'_> ) -> Poll<Option<<S as Stream>::Item>>

Attempt to pull out the next value of this stream, registering the current task for wakeup if the value is not yet available, and returning None if the stream is exhausted. Read more
§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the stream. Read more