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
sourceimpl Clone for RecvTimeoutError
impl Clone for RecvTimeoutError
sourcepub fn clone(&self) -> RecvTimeoutError
pub fn clone(&self) -> RecvTimeoutError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RecvTimeoutError
impl Debug for RecvTimeoutError
1.15.0 · sourceimpl Display for RecvTimeoutError
impl Display for RecvTimeoutError
1.15.0 · sourceimpl Error for RecvTimeoutError
impl Error for RecvTimeoutError
sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
use the Display impl or to_string()
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.24.0 · sourceimpl From<RecvError> for RecvTimeoutError
impl From<RecvError> for RecvTimeoutError
sourcepub fn from(err: RecvError) -> RecvTimeoutError
pub fn from(err: RecvError) -> RecvTimeoutError
Converts a RecvError
into a RecvTimeoutError
.
This conversion always returns RecvTimeoutError::Disconnected
.
No data is allocated on the heap.
sourceimpl PartialEq<RecvTimeoutError> for RecvTimeoutError
impl PartialEq<RecvTimeoutError> for RecvTimeoutError
impl Copy for RecvTimeoutError
impl Eq for RecvTimeoutError
impl StructuralEq for RecvTimeoutError
impl StructuralPartialEq for RecvTimeoutError
Auto Trait Implementations
impl RefUnwindSafe for RecvTimeoutError
impl Send for RecvTimeoutError
impl Sync for RecvTimeoutError
impl Unpin for RecvTimeoutError
impl UnwindSafe for RecvTimeoutError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more