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>
where S: Sink<Item> + Unpin,

source

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>

source

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> Debug for SplitSink<S, Item>
where S: Debug, Item: Debug,

source§

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

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

impl<S, Item> Sink<Item> for SplitSink<S, Item>
where S: Sink<Item>,

§

type Error = <S as Sink<Item>>::Error

The type of value produced by the sink when an error occurs.
source§

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 more
source§

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
source§

fn poll_flush( self: Pin<&mut SplitSink<S, Item>>, cx: &mut Context<'_>, ) -> Poll<Result<(), <S as Sink<Item>>::Error>>

Flush any remaining output from this sink. Read more
source§

fn poll_close( self: Pin<&mut SplitSink<S, Item>>, cx: &mut Context<'_>, ) -> Poll<Result<(), <S as Sink<Item>>::Error>>

Flush any remaining output and close this sink, if necessary. Read more
source§

impl<S, Item> Unpin for SplitSink<S, Item>