Enum tokio_proto::streaming::multiplex::Frame[][src]

pub enum Frame<T, B, E> {
    Message {
        id: RequestId,
        message: T,
        body: bool,
        solo: bool,
    },
    Body {
        id: RequestId,
        chunk: Option<B>,
    },
    Error {
        id: RequestId,
        error: E,
    },
}

A multiplexed protocol frame

Variants

Either a request or a response.

Fields of Message

Message exchange identifier

The message value

Set to true when body frames will follow with the same request ID.

Set to true when this message does not have a pair in the other direction

Body frame.

Fields of Body

Message exchange identifier

Body chunk. Setting to None indicates that the body is done streaming and there will be no further body frames sent with the given request ID.

Error

Fields of Error

Message exchange identifier

Error value

Methods

impl<T, B, E> Frame<T, B, E>
[src]

Return the request ID associated with the frame.

Unwraps a frame, yielding the content of the Message.

Unwraps a frame, yielding the content of the Body.

Unwraps a frame, yielding the content of the Error.

Trait Implementations

impl<T: Debug, B: Debug, E: Debug> Debug for Frame<T, B, E>
[src]

Formats the value using the given formatter. Read more

impl<T: Clone, B: Clone, E: Clone> Clone for Frame<T, B, E>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<T, B, E> Send for Frame<T, B, E> where
    B: Send,
    E: Send,
    T: Send

impl<T, B, E> Sync for Frame<T, B, E> where
    B: Sync,
    E: Sync,
    T: Sync