Enum tokio_proto::streaming::Message
[−]
[src]
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]
impl<T, B> Message<T, B>
pub fn get_ref(&self) -> &T
[src]
pub fn get_ref(&self) -> &T
Returns a reference to the inner value
pub fn get_mut(&mut self) -> &mut T
[src]
pub fn get_mut(&mut self) -> &mut T
Returns a mutable reference to the inner value
pub fn into_inner(self) -> T
[src]
pub fn into_inner(self) -> T
Consumes the value and returns the inner value
pub fn take_body(&mut self) -> Option<B>
[src]
pub fn take_body(&mut self) -> Option<B>
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> PartialEq<T> for Message<T, B> where
T: PartialEq,
[src]
impl<T, B> PartialEq<T> for Message<T, B> where
T: PartialEq,
fn eq(&self, other: &T) -> bool
[src]
fn eq(&self, other: &T) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]This method tests for !=
.
impl<T, B> Deref for Message<T, B>
[src]
impl<T, B> Deref for Message<T, B>
type Target = T
The resulting type after dereferencing.
fn deref(&self) -> &T
[src]
fn deref(&self) -> &T
Dereferences the value.
impl<T, B> DerefMut for Message<T, B>
[src]
impl<T, B> DerefMut for Message<T, B>
impl<T, B> Debug for Message<T, B> where
T: Debug,
[src]
impl<T, B> Debug for Message<T, B> where
T: Debug,