pub struct Frame { /* fields omitted */ }
Expand description
A struct representing a WebSocket frame.
Get the length of the frame.
This is the length of the header + the length of the payload.
Return false
: a frame is never empty since it has a header.
Test whether the frame is a final frame.
Test whether the first reserved bit is set.
Test whether the second reserved bit is set.
Test whether the third reserved bit is set.
Get the OpCode of the frame.
Test whether this is a control frame.
Get a reference to the frame’s payload.
Make this frame a final frame.
Set the first reserved bit.
Set the second reserved bit.
Set the third reserved bit.
Edit the frame’s payload.
Consume the frame into its payload.
Create a new Pong control frame.
Create a new Ping control frame.
Create a new Close control frame.
Parse the input stream into a frame.
Write a frame out to a buffer
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Formats the value using the given formatter. Read more
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String
. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
impl<V, T> VZip<V> for T where
V: MultiLane<T>,