[][src]Enum carrier::packet::Frame

pub enum Frame {
    Header {
        stream: u32,
        payload: Vec<u8>,
    },
    Stream {
        stream: u32,
        order: u64,
        payload: Vec<u8>,
    },
    Ack {
        delay: u64,
        acked: Vec<u64>,
    },
    Ping,
    Disconnect,
    Close {
        stream: u32,
        order: u64,
    },
    Config {
        timeout: Option<u16>,
        sleeping: bool,
    },
}

Variants

Header

Fields of Header

stream: u32payload: Vec<u8>
Stream

Fields of Stream

stream: u32order: u64payload: Vec<u8>
Ack

Fields of Ack

delay: u64acked: Vec<u64>
PingDisconnectClose

Fields of Close

stream: u32order: u64
Config

Fields of Config

timeout: Option<u16>sleeping: bool

Methods

impl Frame[src]

pub fn len(&self) -> usize[src]

pub fn is_ping(&self) -> bool[src]

pub fn is_ack(&self) -> bool[src]

pub fn order(&self) -> u64[src]

pub fn encode<W: Write>(&self, w: W) -> Result<usize, Error>[src]

pub fn decode<R: Read>(r: R) -> Result<Vec<Frame>, Error>[src]

Trait Implementations

impl PartialEq<Frame> for Frame[src]

impl Debug for Frame[src]

Auto Trait Implementations

impl Send for Frame

impl Sync for Frame

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

impl<T> Same for T

type Output = T

Should always be Self