[−][src]Enum tokio_proto::streaming::pipeline::Frame
pub enum Frame<T, B, E> { Message { message: T, body: bool, }, Body { chunk: Option<B>, }, Error { error: E, }, }
A pipelined protocol frame
Variants
Either a request or a response
Fields of Message
Body frame. None indicates that the body is done streaming.
Fields of Body
chunk: Option<B>
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
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: Clone, B: Clone, E: Clone> Clone for Frame<T, B, E>
[src][+]
impl<T: Debug, B: Debug, E: Debug> Debug for Frame<T, B, E>
[src][+]
Auto Trait Implementations
impl<T, B, E> RefUnwindSafe for Frame<T, B, E> where
B: RefUnwindSafe,
E: RefUnwindSafe,
T: RefUnwindSafe,
B: RefUnwindSafe,
E: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, B, E> Send for Frame<T, B, E> where
B: Send,
E: Send,
T: Send,
B: Send,
E: Send,
T: Send,
impl<T, B, E> Sync for Frame<T, B, E> where
B: Sync,
E: Sync,
T: Sync,
B: Sync,
E: Sync,
T: Sync,
impl<T, B, E> Unpin for Frame<T, B, E> where
B: Unpin,
E: Unpin,
T: Unpin,
B: Unpin,
E: Unpin,
T: Unpin,
impl<T, B, E> UnwindSafe for Frame<T, B, E> where
B: UnwindSafe,
E: UnwindSafe,
T: UnwindSafe,
B: UnwindSafe,
E: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,