Struct websocket::dataframe::DataFrame [-] [+] [src]

pub struct DataFrame {
    pub finished: bool,
    pub reserved: [bool; 3],
    pub opcode: Opcode,
    pub data: Vec<u8>,
}

Represents a WebSocket data frame.

The data held in a DataFrame is never masked. Masking/unmasking is done when sending and receiving the data frame,

Fields

finished

Whether or no this constitutes the end of a message

reserved

The reserved portion of the data frame (RFC6455 5.2)

opcode

The opcode associated with this data frame

data

The payload associated with this data frame

Methods

impl DataFrame

fn new(finished: bool, opcode: Opcode, data: Vec<u8>) -> DataFrame

Creates a new DataFrame.

Trait Implementations

Derived Implementations

impl PartialEq for DataFrame

fn eq(&self, __arg_0: &DataFrame) -> bool

fn ne(&self, __arg_0: &DataFrame) -> bool

impl Clone for DataFrame

fn clone(&self) -> DataFrame

fn clone_from(&mut self, source: &Self)

impl Debug for DataFrame

fn fmt(&self, __arg_0: &mut Formatter) -> Result