Enum tk_http::websocket::Packet [] [src]

pub enum Packet {
    Ping(Vec<u8>),
    Pong(Vec<u8>),
    Text(String),
    Binary(Vec<u8>),
    Close(u16String),
}

A websocket packet

Note: unlike Frame this has data allocated on the heap so has static lifetime

Variants

Ping packet (with data)

Pong packet (with data)

Text (utf-8) messsage

Binary message

Close message

Trait Implementations

impl Debug for Packet
[src]

[src]

Formats the value using the given formatter. Read more

impl Clone for Packet
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a> From<&'a Packet> for Frame<'a>
[src]

[src]

Performs the conversion.

impl<'a> Into<Packet> for Frame<'a>
[src]

[src]

Performs the conversion.

impl<'a> Into<Packet> for &'a Frame<'a>
[src]

[src]

Performs the conversion.

Auto Trait Implementations

impl Send for Packet

impl Sync for Packet