[][src]Enum engine_io_server::packet::PacketData

pub enum PacketData {
    Plaintext(String),
    Binary(Bytes),
    Empty,
}

Use this enum to figure out if a packet in a payload has binary or string data. In string-encoded payloads, each packet may contain string or binary data. Binary data in string-encoded payloads is encoded to base64. Otherwise, string data is returned as is. In binary-encoded payloads, each packet may contain string or binary data. If a packet in a payload has string data, it's parsed as a UTF-8 string.

Variants

Plaintext(String)
Binary(Bytes)
Empty

Trait Implementations

impl Clone for PacketData[src]

impl Debug for PacketData[src]

impl<'_> From<&'_ [u8]> for PacketData[src]

impl<'_> From<&'_ str> for PacketData[src]

impl From<String> for PacketData[src]

impl From<Vec<u8>> for PacketData[src]

impl PartialEq<PacketData> for PacketData[src]

impl StructuralPartialEq for PacketData[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,