Expand description
Data sent over the websocket connection.
Variants
Binary(Vec<u8, Global>)
Send some bytes.
Ping(Vec<u8, Global>)
Send a PING message.
Pong(Vec<u8, Global>)
Send an unsolicited PONG message. (Incoming PINGs are answered automatically.)
Trait Implementations
sourceimpl Clone for OutgoingData
impl Clone for OutgoingData
sourcepub fn clone(&self) -> OutgoingData
pub fn clone(&self) -> OutgoingData
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for OutgoingData
impl Debug for OutgoingData
sourceimpl<T> Sink<OutgoingData> for Connection<T> where
T: 'static + AsyncRead + AsyncWrite + Send + Unpin,
impl<T> Sink<OutgoingData> for Connection<T> where
T: 'static + AsyncRead + AsyncWrite + Send + Unpin,
sourcepub fn poll_ready(
self: Pin<&mut Connection<T>>,
cx: &mut Context<'_>
) -> Poll<Result<(), Error>>
pub 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
sourcepub fn start_send(
self: Pin<&mut Connection<T>>,
item: OutgoingData
) -> Result<(), Error>
pub 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
sourcepub fn poll_flush(
self: Pin<&mut Connection<T>>,
cx: &mut Context<'_>
) -> Poll<Result<(), Error>>
pub fn poll_flush(
self: Pin<&mut Connection<T>>,
cx: &mut Context<'_>
) -> Poll<Result<(), Error>>
Flush any remaining output from this sink. Read more
sourcepub fn poll_close(
self: Pin<&mut Connection<T>>,
cx: &mut Context<'_>
) -> Poll<Result<(), Error>>
pub 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 RefUnwindSafe for OutgoingData
impl Send for OutgoingData
impl Sync for OutgoingData
impl Unpin for OutgoingData
impl UnwindSafe for OutgoingData
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more