pub struct FrameHeader { /* private fields */ }
Expand description

Describes an individual frame within a WebSocket message at a low level.

The frame header is a lower level detail of the WebSocket protocol. At the application level, use Message structs and the MessageCodec.

Implementations

Returns a FrameHeader struct.

Returns the WebSocket FIN bit, which indicates that this is the last frame in the message.

Returns the WebSocket RSV1, RSV2 and RSV3 bits.

The RSV bits may be used by extensions to the WebSocket protocol not exposed by this crate.

Returns the WebSocket opcode, which defines the interpretation of the frame payload data.

Returns the frame’s mask.

Returns the length of the payload data that follows this header.

Returns the total length of the frame header.

The frame header is between 2 bytes and 10 bytes in length, depending on the presence of a mask and the length of the payload data.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The type of encoding errors. Read more

Encodes a frame into the buffer provided. Read more

The type of encoding errors. Read more

Encodes a frame into the buffer provided. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more