Enum libp2p::websocket::framed::OutgoingData
source · pub enum OutgoingData {
Binary(Vec<u8>),
Ping(Vec<u8>),
Pong(Vec<u8>),
}
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§
source§impl Clone for OutgoingData
impl Clone for OutgoingData
source§fn clone(&self) -> OutgoingData
fn clone(&self) -> OutgoingData
Returns a copy 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 moresource§impl Debug for OutgoingData
impl Debug for OutgoingData
source§impl<T> Sink<OutgoingData> for Connection<T>
impl<T> Sink<OutgoingData> for Connection<T>
source§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 moresource§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 moreAuto 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§
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,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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