pub enum RecvTimeoutError {
Timeout,
Disconnected,
}Expand description
This enumeration is the list of possible errors that made recv_timeout
unable to return data when called. This can occur with both a channel and
a sync_channel.
Variantsยง
Timeout
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ยง
1.12.0 ยท Sourceยงimpl Clone for RecvTimeoutError
impl Clone for RecvTimeoutError
Sourceยงfn clone(&self) -> RecvTimeoutError
fn clone(&self) -> RecvTimeoutError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RecvTimeoutError
1.12.0 ยท Sourceยงimpl Debug for RecvTimeoutError
impl Debug for RecvTimeoutError
1.15.0 ยท Sourceยงimpl Display for RecvTimeoutError
impl Display for RecvTimeoutError
impl Eq for RecvTimeoutError
1.15.0 ยท Sourceยงimpl Error for RecvTimeoutError
impl Error for RecvTimeoutError
1.30.0 ยท Sourceยงfn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 ยท Sourceยงfn description(&self) -> &str
fn description(&self) -> &str
๐Deprecated since 1.42.0:
use the Display impl or to_string()
1.24.0 ยท Sourceยงimpl From<RecvError> for RecvTimeoutError
impl From<RecvError> for RecvTimeoutError
Sourceยงfn from(err: RecvError) -> RecvTimeoutError
fn from(err: RecvError) -> RecvTimeoutError
Converts a RecvError into a RecvTimeoutError.
This conversion always returns RecvTimeoutError::Disconnected.
No data is allocated on the heap.
1.12.0 ยท Sourceยงimpl PartialEq for RecvTimeoutError
impl PartialEq for RecvTimeoutError
Sourceยงfn eq(&self, other: &RecvTimeoutError) -> bool
fn eq(&self, other: &RecvTimeoutError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RecvTimeoutError
Auto Trait Implementationsยง
impl Freeze for RecvTimeoutError
impl RefUnwindSafe for RecvTimeoutError
impl Send for RecvTimeoutError
impl Sync for RecvTimeoutError
impl Unpin for RecvTimeoutError
impl UnsafeUnpin for RecvTimeoutError
impl UnwindSafe for RecvTimeoutError
Blanket Implementationsยง
Sourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more