Enum tk_http::websocket::Packet
[−]
[src]
pub enum Packet {
Ping(Vec<u8>),
Pong(Vec<u8>),
Text(String),
Binary(Vec<u8>),
Close(u16, String),
}A websocket packet
Note: unlike Frame this has data allocated on the heap so has static
lifetime
Variants
Ping(Vec<u8>)Ping packet (with data)
Pong(Vec<u8>)Pong packet (with data)
Text(String)Text (utf-8) messsage
Binary(Vec<u8>)Binary message
Close(u16, String)Close message
Trait Implementations
impl Debug for Packet[src]
impl Clone for Packet[src]
fn clone(&self) -> Packet
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more