Enum tokio_proto::streaming::pipeline::Frame
[−]
[src]
pub enum Frame<T, B, E> { Message { message: T, body: bool, }, Body { chunk: Option<B>, }, Error { error: E, }, }
A pipelined protocol frame
Variants
Message
Either a request or a response
Fields
message: T | The message value |
body: bool | Set to true when body frames will follow |
Body
Body frame. None indicates that the body is done streaming.
Fields
chunk: Option<B> | Body chunk. Setting to |
Error
Error
Fields
error: E | Error value |
Methods
impl<T, B, E> Frame<T, B, E>
[src]
fn unwrap_msg(self) -> T
Unwraps a frame, yielding the content of the Message
.
fn unwrap_body(self) -> Option<B>
Unwraps a frame, yielding the content of the Body
.
fn unwrap_err(self) -> E
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]
impl<T: Clone, B: Clone, E: Clone> Clone for Frame<T, B, E>
[src]
fn clone(&self) -> Frame<T, B, E>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more