[][src]Enum tokio_proto::streaming::Message

pub enum Message<T, B> {
    WithoutBody(T),
    WithBody(T, B),
}

Message sent and received from a multiplexed service

Variants

WithoutBody(T)

Has no associated streaming body

WithBody(T, B)

Has associated streaming body

Methods

impl<T, B> Message<T, B>[src]

pub fn get_ref(&self) -> &T[src]

Returns a reference to the inner value

pub fn get_mut(&mut self) -> &mut T[src]

Returns a mutable reference to the inner value

pub fn into_inner(self) -> T[src]

Consumes the value and returns the inner value

pub fn take_body(&mut self) -> Option<B>[src]

If the Message value has an associated body stream, return it. The original Message value will then become a WithoutBody variant.

Trait Implementations

impl<T, B> Debug for Message<T, B> where
    T: Debug
[src]

impl<T, B> Deref for Message<T, B>[src]

type Target = T

The resulting type after dereferencing.

impl<T, B> DerefMut for Message<T, B>[src]

impl<T, B> PartialEq<T> for Message<T, B> where
    T: PartialEq
[src]

Auto Trait Implementations

impl<T, B> RefUnwindSafe for Message<T, B> where
    B: RefUnwindSafe,
    T: RefUnwindSafe

impl<T, B> Send for Message<T, B> where
    B: Send,
    T: Send

impl<T, B> Sync for Message<T, B> where
    B: Sync,
    T: Sync

impl<T, B> Unpin for Message<T, B> where
    B: Unpin,
    T: Unpin

impl<T, B> UnwindSafe for Message<T, B> where
    B: UnwindSafe,
    T: UnwindSafe

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.