Struct ws::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.

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.

Important traits for Vec<u8>

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.

Important traits for Vec<u8>

Edit the frame's payload.

Important traits for Vec<u8>

Consume the frame into its payload.

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. Read more

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

Auto Trait Implementations

impl Send for Frame

impl Sync for Frame