Enum dharma::bridge::ReceiveResult
[−]
[src]
pub enum ReceiveResult<T> where
T: Clone + Send, { Plain(T), Defined(SignalId, T), Custom(&'static str, T), Any(String, Box<Any + Send>), Special(SpecialCommand), Empty, Timeout, Err, }
Result returned from Receiver::recv
, Receiver::try_recv
or Receiver::recv_timeout
.
Variants
Plain(T)
Successful receive with plain variant
Defined(SignalId, T)
Successful receive with defined variant
Custom(&'static str, T)
Successful receive with custom variant
Any(String, Box<Any + Send>)
Successful receive with any variant
Special(SpecialCommand)
Successful receive with special variant
Empty
Queue was empty.
Timeout
Wait timed out.
Err
Unknown error.
Methods
impl<T> ReceiveResult<T> where
T: Clone + Send + PartialEq,
[src]
T: Clone + Send + PartialEq,
Comparing ReceiveResult
. This is needed because Any
can not be compared directly.
fn is_plain(&self, pkg1: T) -> bool
Returns true if ReceiveResult
is Plain
with given parameters.
fn is_defined(&self, id1: SignalId, pkg1: T) -> bool
Returns true if ReceiveResult
is Defined
with given parameters.
fn is_custom(&self, id1: &'static str, pkg1: T) -> bool
Returns true if ReceiveResult
is Custom
with given parameters.
fn is_special(&self, cmd1: SpecialCommand) -> bool
Returns true if ReceiveResult
is Special
with given parameters.
fn is_empty(&self) -> bool
Returns true if ReceiveResult
is Empty
.
fn is_timeout(&self) -> bool
Returns true if ReceiveResult
is Timeout
.
Trait Implementations
impl<T: Debug> Debug for ReceiveResult<T> where
T: Clone + Send,
[src]
T: Clone + Send,