Struct tungstenite::protocol::frame::Frame [] [src]

pub struct Frame { /* fields omitted */ }

A struct representing a WebSocket frame.

Methods

impl Frame
[src]

Get the length of the frame. This is the length of the header + the length of the payload.

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.

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.

Set the OpCode.

Edit the frame's payload.

Consume the frame into its payload as binary.

Consume the frame into its payload as string.

Consume the frame into a closing frame.

Create a new data frame.

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

Trait Implementations

impl Debug for Frame
[src]

Formats the value using the given formatter.

impl Clone for Frame
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Default for Frame
[src]

Returns the "default value" for a type. Read more

impl Display for Frame
[src]

Formats the value using the given formatter. Read more