[−][src]Enum in_stream::WsFrame
enumerates the different websocket message types
Variants
Text(String)
utf8 text
a string of bytes
a ping message, content must be < 125 bytes
a pong message, content must be < 125 bytes
Close(CloseData)
a close message, with a websocket close code https://www.iana.org/assignments/websocket/websocket.xml#close-code-number
Implementations
impl WsFrame
[src]
pub fn assume<O: Into<Self>>(&mut self, oth: O)
[src]
consume another frame-type instance
pub fn as_bytes(&self) -> &[u8]
[src]
get frame data out as byte slice
pub fn as_str(&self) -> Cow<str>
[src]
get frame data out as a string slice
pub fn is_text(&self) -> bool
[src]
true if frame type is WsFrame::Text
pub fn is_binary(&self) -> bool
[src]
true if frame type is WsFrame::Binary
pub fn is_ping(&self) -> bool
[src]
true if frame type is WsFrame::Ping
pub fn is_pong(&self) -> bool
[src]
true if frame type is WsFrame::Pong
pub fn is_close(&self) -> bool
[src]
true if frame type is WsFrame::Close
Trait Implementations
impl Clone for WsFrame
[src]
impl Debug for WsFrame
[src]
impl Default for WsFrame
[src]
impl<'_> From<&'_ [u8]> for WsFrame
[src]
impl<'_> From<&'_ str> for WsFrame
[src]
impl From<Message> for WsFrame
[src]
impl From<String> for WsFrame
[src]
impl From<Vec<u8>> for WsFrame
[src]
impl From<WsFrame> for Message
[src]
impl<'_, Sub: InStreamStd> InStream<&'_ mut WsFrame, WsFrame> for InStreamWss<Sub>
[src]
const URL_SCHEME: &'static str
[src]
fn raw_connect<C: InStreamConfig>(url: &Url2, config: C) -> Result<Self>
[src]
fn check_ready(&mut self) -> Result<bool>
[src]
fn remote_url(&self) -> Url2
[src]
fn read(&mut self, data: &mut WsFrame) -> Result<usize>
[src]
fn write(&mut self, data: WsFrame) -> Result<usize>
[src]
fn flush(&mut self) -> Result<()>
[src]
impl<'_, Sub: InStreamListenerStd> InStreamListener<&'_ mut WsFrame, WsFrame> for InStreamListenerWss<Sub>
[src]
Auto Trait Implementations
impl RefUnwindSafe for WsFrame
impl Send for WsFrame
impl Sync for WsFrame
impl Unpin for WsFrame
impl UnwindSafe for WsFrame
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,