Enum OutgoingData  
pub enum OutgoingData {
    Binary(Vec<u8>),
    Ping(Vec<u8>),
    Pong(Vec<u8>),
}Available on crate feature 
websocket and non-WebAssembly only.Expand description
Data sent over the websocket connection.
Variants§
Binary(Vec<u8>)
Send some bytes.
Ping(Vec<u8>)
Send a PING message.
Pong(Vec<u8>)
Send an unsolicited PONG message. (Incoming PINGs are answered automatically.)
Trait Implementations§
§impl Clone for OutgoingData
 
impl Clone for OutgoingData
§fn clone(&self) -> OutgoingData
 
fn clone(&self) -> OutgoingData
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read more§impl Debug for OutgoingData
 
impl Debug for OutgoingData
§impl<T> Sink<OutgoingData> for Connection<T>
 
impl<T> Sink<OutgoingData> for Connection<T>
§fn poll_ready(
    self: Pin<&mut Connection<T>>,
    cx: &mut Context<'_>,
) -> Poll<Result<(), Error>>
 
fn poll_ready( self: Pin<&mut Connection<T>>, cx: &mut Context<'_>, ) -> Poll<Result<(), Error>>
Attempts to prepare the 
Sink to receive a value. Read more§fn start_send(
    self: Pin<&mut Connection<T>>,
    item: OutgoingData,
) -> Result<(), Error>
 
fn start_send( self: Pin<&mut Connection<T>>, item: OutgoingData, ) -> Result<(), 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§fn poll_flush(
    self: Pin<&mut Connection<T>>,
    cx: &mut Context<'_>,
) -> Poll<Result<(), Error>>
 
fn poll_flush( self: Pin<&mut Connection<T>>, cx: &mut Context<'_>, ) -> Poll<Result<(), Error>>
Flush any remaining output from this sink. Read more
§fn poll_close(
    self: Pin<&mut Connection<T>>,
    cx: &mut Context<'_>,
) -> Poll<Result<(), Error>>
 
fn poll_close( self: Pin<&mut Connection<T>>, cx: &mut Context<'_>, ) -> Poll<Result<(), Error>>
Flush any remaining output and close this sink, if necessary. Read more
Auto Trait Implementations§
impl Freeze for OutgoingData
impl RefUnwindSafe for OutgoingData
impl Send for OutgoingData
impl Sync for OutgoingData
impl Unpin for OutgoingData
impl UnwindSafe for OutgoingData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
    T: 'a,
 
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
    T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
    T: 'a,
 
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
    T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
    T: 'a,
 
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
    T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
    T: 'a,
 
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
    T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
§impl<T> Instrument for T
 
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
 
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
 
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more