Struct ws::Frame [] [src]

pub struct Frame { /* fields omitted */ }

A struct representing a WebSocket frame.

Methods

impl Frame
[src]

[src]

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

[src]

Test whether the frame is a final frame.

[src]

Test whether the first reserved bit is set.

[src]

Test whether the second reserved bit is set.

[src]

Test whether the third reserved bit is set.

[src]

Get the OpCode of the frame.

[src]

Test whether this is a control frame.

[src]

Get a reference to the frame's payload.

[src]

Make this frame a final frame.

[src]

Set the first reserved bit.

[src]

Set the second reserved bit.

[src]

Set the third reserved bit.

[src]

Set the OpCode.

[src]

Edit the frame's payload.

[src]

Consume the frame into its payload.

[src]

Create a new data frame.

[src]

Create a new Pong control frame.

[src]

Create a new Ping control frame.

[src]

Create a new Close control frame.

[src]

Parse the input stream into a frame.

[src]

Write a frame out to a buffer

Trait Implementations

impl Debug for Frame
[src]

[src]

Formats the value using the given formatter. Read more

impl Clone for Frame
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Default for Frame
[src]

[src]

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

impl Display for Frame
[src]

[src]

Formats the value using the given formatter. Read more