pub struct WsFrame {
pub fin: bool,
pub rsv1: bool,
pub rsv2: bool,
pub rsv3: bool,
pub opcode: WsOpcode,
pub payload: Bytes,
}Fields§
§fin: bool§rsv1: bool§rsv2: bool§rsv3: bool§opcode: WsOpcode§payload: BytesImplementations§
Source§impl WsFrame
impl WsFrame
pub fn is_text(&self) -> bool
pub fn is_binary(&self) -> bool
pub fn is_continuation(&self) -> bool
pub fn text(&self) -> Option<&str>
pub fn set_text(&mut self, data: &str)
pub fn set_binary(&mut self, data: impl Into<Bytes>)
pub fn decompress_with(&self, decompressor: &mut Decompress) -> Option<Bytes>
Trait Implementations§
impl Eq for WsFrame
impl StructuralPartialEq for WsFrame
Auto Trait Implementations§
impl !Freeze for WsFrame
impl RefUnwindSafe for WsFrame
impl Send for WsFrame
impl Sync for WsFrame
impl Unpin for WsFrame
impl UnsafeUnpin for WsFrame
impl UnwindSafe for WsFrame
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.