#[non_exhaustive]pub enum UnhandledPanic {
Ignore,
ShutdownRuntime,
}Expand description
What a runtime does when one of its tasks panics
(Builder::unhandled_panic).
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.
Ignore
The panic is the task’s outcome, for whoever awaits it; the runtime runs on.
ShutdownRuntime
The runtime shuts down at once: its workers stop and drop their
tasks, and every block_on of it panics, those running and every
later one. The panicked task’s handle still reports the panic.
Trait Implementations§
Source§impl Clone for UnhandledPanic
impl Clone for UnhandledPanic
Source§fn clone(&self) -> UnhandledPanic
fn clone(&self) -> UnhandledPanic
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 UnhandledPanic
Source§impl Debug for UnhandledPanic
impl Debug for UnhandledPanic
Source§impl Default for UnhandledPanic
impl Default for UnhandledPanic
Source§fn default() -> UnhandledPanic
fn default() -> UnhandledPanic
Returns the “default value” for a type. Read more
impl Eq for UnhandledPanic
Source§impl PartialEq for UnhandledPanic
impl PartialEq for UnhandledPanic
impl StructuralPartialEq for UnhandledPanic
Auto Trait Implementations§
impl Freeze for UnhandledPanic
impl RefUnwindSafe for UnhandledPanic
impl Send for UnhandledPanic
impl Sync for UnhandledPanic
impl Unpin for UnhandledPanic
impl UnsafeUnpin for UnhandledPanic
impl UnwindSafe for UnhandledPanic
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