pub enum OwnedMessage {
Text(String),
Binary(Vec<u8>),
Ping(Vec<u8>),
Pong(Vec<u8>),
Close(OwnedCloseFrame),
}Expand description
An owned WebSocket message, detached from reader buffers.
Variants§
Text(String)
UTF-8 text message.
Binary(Vec<u8>)
Binary message.
Ping(Vec<u8>)
Ping control frame.
Pong(Vec<u8>)
Pong control frame.
Close(OwnedCloseFrame)
Connection close.
Implementations§
Trait Implementations§
Source§impl Clone for OwnedMessage
impl Clone for OwnedMessage
Source§fn clone(&self) -> OwnedMessage
fn clone(&self) -> OwnedMessage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 OwnedMessage
impl Debug for OwnedMessage
Source§impl<S: WireStream + Unpin> Sink<OwnedMessage> for WsStream<S>
impl<S: WireStream + Unpin> Sink<OwnedMessage> for WsStream<S>
Source§fn poll_ready(
self: Pin<&mut Self>,
_cx: &mut Context<'_>,
) -> Poll<Result<(), Self::Error>>
fn poll_ready( self: Pin<&mut Self>, _cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>
Attempts to prepare the
Sink to receive a value. Read moreSource§fn start_send(
self: Pin<&mut Self>,
item: OwnedMessage,
) -> Result<(), Self::Error>
fn start_send( self: Pin<&mut Self>, item: OwnedMessage, ) -> Result<(), Self::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 OwnedMessage
impl RefUnwindSafe for OwnedMessage
impl Send for OwnedMessage
impl Sync for OwnedMessage
impl Unpin for OwnedMessage
impl UnsafeUnpin for OwnedMessage
impl UnwindSafe for OwnedMessage
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