Enum std::comm::TryRecvResult
pub enum TryRecvResult<T> { Empty, Disconnected, Data(T), }
This enumeration is the list of the possible reasons that try_recv could not return data when called.
Variants
Empty | This channel is currently empty, but the sender(s) have not yet disconnected, so data may yet become available. |
Disconnected | This channel's sending half has become disconnected, and there will never be any more data received on this channel |
Data | The channel had some data and we successfully popped it |
Trait Implementations
Derived Implementations
impl<T: Show> Show for TryRecvResult<T>
impl<T: Clone> Clone for TryRecvResult<T>
fn clone(&self) -> TryRecvResult<T>
Returns a copy of the value. The contents of owned pointers are copied to maintain uniqueness, while the contents of managed pointers are not copied.
fn clone_from(&mut self, source: &Self)
Perform copy-assignment from source
.
a.clone_from(&b)
is equivalent to a = b.clone()
in functionality,
but can be overridden to reuse the resources of a
to avoid unnecessary
allocations.