Enum mio_httpc::WSPacket[][src]

pub enum WSPacket<'a> {
    None,
    Text(bool, &'a str),
    Binary(bool&'a [u8]),
    Ping(&'a [u8]),
    Pong(&'a [u8]),
    Close(Option<u16>, &'a [u8]),
}
Expand description

WebSocket packet received from server.

Variants

None

Nothing to return yet.

Text(bool, &'a str)

(fin,text)

Tuple Fields of Text

0: bool1: &'a str
Binary(bool&'a [u8])

(fin, bin)

Tuple Fields of Binary

0: bool1: &'a [u8]
Ping(&'a [u8])

Ping may contain data. You should send pong back.

Tuple Fields of Ping

0: &'a [u8]
Pong(&'a [u8])

Pong may contain data.

Tuple Fields of Pong

0: &'a [u8]
Close(Option<u16>, &'a [u8])

(StatusCode,Data) Close may contain data. You should call close after receiving this (if you did not already).

Tuple Fields of Close

0: Option<u16>1: &'a [u8]

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.