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: u16
The status-code of the CloseData
reason: String
The reason-phrase of the CloseData
Methods
impl CloseData
[src]
pub fn new(status_code: u16, reason: String) -> CloseData
[src]
Create a new CloseData object
pub fn into_bytes(self) -> Result<Vec<u8>>
[src]
Convert this into a vector of bytes
Trait Implementations
impl Eq for CloseData
[src]
impl PartialEq for CloseData
[src]
fn eq(&self, __arg_0: &CloseData) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &CloseData) -> bool
[src]
This method tests for !=
.
impl Clone for CloseData
[src]
fn clone(&self) -> CloseData
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more