Struct websocket::message::CloseData [-] [+] [src]

pub struct CloseData {
    pub status_code: u16,
    pub reason: String,
}

Represents data contained in a Close message

Fields

status_code

The status-code of the CloseData

reason

The reason-phrase of the CloseData

Methods

impl CloseData

fn new(status_code: u16, reason: String) -> CloseData

Create a new CloseData object

fn into_bytes(self) -> Result<Vec<u8>>

Convert this into a vector of bytes

Trait Implementations

Derived Implementations

impl Debug for CloseData

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

impl Clone for CloseData

fn clone(&self) -> CloseData

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

impl PartialEq for CloseData

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

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