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
MessageEither a request or a response
Fields of Message
message: T | The message value |
body: bool | Set to true when body frames will follow |
BodyBody frame. None indicates that the body is done streaming.
Fields of Body
chunk: Option<B> | Body chunk. Setting to |
ErrorError
Fields of Error
error: E | Error value |
Methods
impl<T, B, E> Frame<T, B, E>[src]
pub fn unwrap_msg(self) -> T[src]
Unwraps a frame, yielding the content of the Message.
pub fn unwrap_body(self) -> Option<B>[src]
Unwraps a frame, yielding the content of the Body.
pub fn unwrap_err(self) -> E[src]
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]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more