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.

Get a reference to the frame's header.

Get a mutable reference to the frame's header.

Important traits for Vec<u8>

Get a reference to the frame's payload.

Important traits for Vec<u8>

Get a mutable reference to the frame's payload.

Important traits for Vec<u8>

Consume the frame into its payload as binary.

Consume the frame into its payload as string.

Create a new data frame.

Create a new Pong control frame.

Create a new Ping control frame.

Create a new Close control frame.

Create a frame from given header and data.

Write a frame out to a buffer

Trait Implementations

impl Debug for Frame
[src]

Formats the value using the given formatter. Read more

impl Clone for Frame
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Display for Frame
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Frame

impl Sync for Frame