pub enum DoneReason {
DeadlineExceeded,
Canceled,
}
Expand description
The reason why a context was stopped, see Context.done
. This “error” can
be turned into an io::Error
by using the Into
trait
(From
<DoneReason>
is implemented for io::Error
).
Variants§
Implementations§
Source§impl DoneReason
impl DoneReason
Sourcepub fn into_error<E>(self) -> E
pub fn into_error<E>(self) -> E
Convert the DoneReason
into an error.
Trait Implementations§
Source§impl Clone for DoneReason
impl Clone for DoneReason
Source§fn clone(&self) -> DoneReason
fn clone(&self) -> DoneReason
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DoneReason
impl Debug for DoneReason
Source§impl Display for DoneReason
impl Display for DoneReason
Source§impl Error for DoneReason
impl Error for DoneReason
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
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
Source§impl From<DoneReason> for Error
impl From<DoneReason> for Error
Source§fn from(reason: DoneReason) -> Self
fn from(reason: DoneReason) -> Self
Converts to this type from the input type.
Source§impl PartialEq for DoneReason
impl PartialEq for DoneReason
impl Copy for DoneReason
impl Eq for DoneReason
impl StructuralPartialEq for DoneReason
Auto Trait Implementations§
impl Freeze for DoneReason
impl RefUnwindSafe for DoneReason
impl Send for DoneReason
impl Sync for DoneReason
impl Unpin for DoneReason
impl UnwindSafe for DoneReason
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