Type Alias workflow_websocket::server::WebSocketSender
source · pub type WebSocketSender = SplitSink<WebSocketStream<TcpStream>, Message>;
Expand description
WebSocket stream sender for dispatching tungstenite::Message
.
This stream object must have a mutable reference and can not be cloned.
Aliased Type§
struct WebSocketSender { /* private fields */ }
Implementations
source§impl<S, Item> SplitSink<S, Item>
impl<S, Item> SplitSink<S, Item>
sourcepub fn reunite(self, other: SplitStream<S>) -> Result<S, ReuniteError<S, Item>>
pub fn reunite(self, other: SplitStream<S>) -> Result<S, ReuniteError<S, 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
.
source§impl<S, Item> SplitSink<S, Item>
impl<S, Item> SplitSink<S, Item>
sourcepub fn is_pair_of(&self, other: &SplitStream<S>) -> bool
pub fn is_pair_of(&self, other: &SplitStream<S>) -> bool
Returns true
if the SplitStream<S>
and SplitSink<S>
originate from the same call to StreamExt::split
.
Trait Implementations
source§impl<S, Item> Sink<Item> for SplitSink<S, Item>where
S: Sink<Item>,
impl<S, Item> Sink<Item> for SplitSink<S, Item>where
S: Sink<Item>,
source§fn poll_ready(
self: Pin<&mut SplitSink<S, Item>>,
cx: &mut Context<'_>,
) -> Poll<Result<(), <S as Sink<Item>>::Error>>
fn poll_ready( self: Pin<&mut SplitSink<S, Item>>, cx: &mut Context<'_>, ) -> Poll<Result<(), <S as Sink<Item>>::Error>>
Attempts to prepare the
Sink
to receive a value. Read moresource§fn start_send(
self: Pin<&mut SplitSink<S, Item>>,
item: Item,
) -> Result<(), <S as Sink<Item>>::Error>
fn start_send( self: Pin<&mut SplitSink<S, Item>>, item: Item, ) -> Result<(), <S as Sink<Item>>::Error>
Begin the process of sending a value to the sink.
Each call to this function must be preceded by a successful call to
poll_ready
which returned Poll::Ready(Ok(()))
. Read more