pub struct WebSocketFrame { /* private fields */ }Available on crate features
Network and Debugger and Runtime and Security only.Expand description
WebSocket message data. This represents an entire WebSocket message, not just a fragmented frame as the name suggests.
Implementations§
Source§impl WebSocketFrame
impl WebSocketFrame
pub fn new(opcode: f64, mask: bool, payload_data: String) -> Self
Sourcepub fn payload_data(&self) -> &str
pub fn payload_data(&self) -> &str
WebSocket message payload data. If the opcode is 1, this is a text message and payloadData is a UTF-8 string. If the opcode isn’t 1, then payloadData is a base64 encoded string representing binary data.
Trait Implementations§
Source§impl Clone for WebSocketFrame
impl Clone for WebSocketFrame
Source§fn clone(&self) -> WebSocketFrame
fn clone(&self) -> WebSocketFrame
Returns a duplicate 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 WebSocketFrame
impl Debug for WebSocketFrame
Source§impl<'de> Deserialize<'de> for WebSocketFrame
impl<'de> Deserialize<'de> for WebSocketFrame
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for WebSocketFrame
impl RefUnwindSafe for WebSocketFrame
impl Send for WebSocketFrame
impl Sync for WebSocketFrame
impl Unpin for WebSocketFrame
impl UnwindSafe for WebSocketFrame
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