pub enum TryRecvError {
Empty,
Disconnected,
}Expand description
This enumeration is the list of the possible reasons that try_recv could
not return data when called. This can occur with both a channel and
a sync_channel.
Variants
Empty
This channel is currently empty, but the Sender(s) have not yet disconnected, so data may yet become available.
Disconnected
The channel’s sending half has become disconnected, and there will never be any more data received on it.
Trait Implementations
impl Clone for TryRecvError
source
impl Clone for TryRecvError
sourcefn clone(&self) -> TryRecvError
source
fn clone(&self) -> TryRecvError
sourceReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
source
fn clone_from(&mut self, source: &Self)
sourcePerforms copy-assignment from source. Read more
impl Debug for TryRecvError
source
impl Debug for TryRecvError
sourceimpl Display for TryRecvError
source
impl Display for TryRecvError
sourceimpl Error for TryRecvError
source
impl Error for TryRecvError
sourcefn description(&self) -> &str
source
fn description(&self) -> &str
sourceuse the Display impl or to_string()
fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0 · source
fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0 · sourceThe lower-level source of this error, if any. Read more
impl From<RecvError> for TryRecvError
1.24.0 · source
impl From<RecvError> for TryRecvError
1.24.0 · sourcefn from(err: RecvError) -> TryRecvError
source
fn from(err: RecvError) -> TryRecvError
sourceConverts a RecvError into a TryRecvError.
This conversion always returns TryRecvError::Disconnected.
No data is allocated on the heap.
impl PartialEq<TryRecvError> for TryRecvError
source
impl PartialEq<TryRecvError> for TryRecvError
sourceimpl Copy for TryRecvError
sourceimpl Eq for TryRecvError
sourceimpl StructuralEq for TryRecvError
sourceimpl StructuralPartialEq for TryRecvError
sourceAuto Trait Implementations
impl RefUnwindSafe for TryRecvError
impl Send for TryRecvError
impl Sync for TryRecvError
impl Unpin for TryRecvError
impl UnwindSafe for TryRecvError
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
source
impl<T> BorrowMut<T> for T where
T: ?Sized,
sourcefn borrow_mut(&mut self) -> &mut T
const: unstable · source
fn borrow_mut(&mut self) -> &mut T
const: unstable · sourceMutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
source
impl<T> ToOwned for T where
T: Clone,
sourcetype Owned = T
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)
source
fn clone_into(&self, target: &mut T)
sourceUses borrowed data to replace owned data, usually by cloning. Read more