pub enum TaskFailed {
Panicked(Bug),
Shutdown(Shutdown),
}Expand description
Why work apart from its caller gave no result.
Variants§
Panicked(Bug)
The work panicked: a bug, which the caller reports.
Shutdown(Shutdown)
The runtime it ran on is shutting down and dropped it before it finished. Not a bug: the process is ending the work.
Implementations§
Source§impl TaskFailed
impl TaskFailed
Sourcepub fn of_join(operation: &'static str, error: JoinError) -> Self
pub fn of_join(operation: &'static str, error: JoinError) -> Self
The failure a joined task’s error stands for. A task the runtime
dropped may have run in part: ShutdownOutcome::Unknown. A task
whose work runs under caught hands its panic back as a value, so
its join fails only as its runtime ends it; a panic that reached the
join uncaught gives a bug that can’t say where it began.
Sourcepub fn into_error<E: From<Bug> + From<Shutdown>>(self) -> E
pub fn into_error<E: From<Bug> + From<Shutdown>>(self) -> E
This failure as the error of the call whose work it ended: its
Bug for a panic, its Shutdown for the runtime dropping the work.
Trait Implementations§
Source§impl CarriesBug for TaskFailed
impl CarriesBug for TaskFailed
Source§impl Clone for TaskFailed
impl Clone for TaskFailed
Source§fn clone(&self) -> TaskFailed
fn clone(&self) -> TaskFailed
Returns a duplicate 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 TaskFailed
impl Debug for TaskFailed
Source§impl Display for TaskFailed
impl Display for TaskFailed
Source§impl Error for TaskFailed
impl Error for TaskFailed
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()
Source§impl From<TaskFailed> for FileError
impl From<TaskFailed> for FileError
Source§fn from(failed: TaskFailed) -> Self
fn from(failed: TaskFailed) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TaskFailed
impl PartialEq for TaskFailed
impl Eq for TaskFailed
impl StructuralPartialEq for TaskFailed
Auto Trait Implementations§
impl Freeze for TaskFailed
impl RefUnwindSafe for TaskFailed
impl Send for TaskFailed
impl Sync for TaskFailed
impl Unpin for TaskFailed
impl UnsafeUnpin for TaskFailed
impl UnwindSafe for TaskFailed
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more