#[non_exhaustive]pub enum SpawnFailure {
NoRuntime,
TaskCancelled,
}Expand description
Why an async blocking operation could not run.
Panics are resumed on the awaiting task rather than reported as spawn failures. This discriminator does not depend on diagnostic text.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NoRuntime
The Tokio operation was polled outside a Tokio runtime.
TaskCancelled
The runtime cancelled the blocking task, its abandoned closure never started, or a started worker observed that its future was dropped.
Trait Implementations§
Source§impl Clone for SpawnFailure
impl Clone for SpawnFailure
impl Copy for SpawnFailure
Source§impl Debug for SpawnFailure
impl Debug for SpawnFailure
Source§impl Display for SpawnFailure
impl Display for SpawnFailure
impl Eq for SpawnFailure
Source§impl Error for SpawnFailure
impl Error for SpawnFailure
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()
Source§impl Hash for SpawnFailure
impl Hash for SpawnFailure
Source§impl PartialEq for SpawnFailure
impl PartialEq for SpawnFailure
impl StructuralPartialEq for SpawnFailure
Auto Trait Implementations§
impl Freeze for SpawnFailure
impl RefUnwindSafe for SpawnFailure
impl Send for SpawnFailure
impl Sync for SpawnFailure
impl Unpin for SpawnFailure
impl UnsafeUnpin for SpawnFailure
impl UnwindSafe for SpawnFailure
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