Struct AppError
pub struct AppError<E> {
pub hook: AppHook,
pub error: E,
pub shutdown_error: Option<E>,
}Expand description
A hook failure and, when applicable, a separate cleanup failure.
The primary error is never replaced by a shutdown error. A failure from an
explicit stop has hook == AppHook::Shutdown and no shutdown_error.
Fields§
§hook: AppHookHook that failed first.
error: EOriginal error returned by that hook.
shutdown_error: Option<E>Additional error from automatic shutdown after the primary failure.
Trait Implementations§
§impl<E> Error for AppError<E>where
E: Error + 'static,
impl<E> Error for AppError<E>where
E: Error + 'static,
§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()
impl<E> Eq for AppError<E>where
E: Eq,
impl<E> StructuralPartialEq for AppError<E>
Auto Trait Implementations§
impl<E> Freeze for AppError<E>where
E: Freeze,
impl<E> RefUnwindSafe for AppError<E>where
E: RefUnwindSafe,
impl<E> Send for AppError<E>where
E: Send,
impl<E> Sync for AppError<E>where
E: Sync,
impl<E> Unpin for AppError<E>where
E: Unpin,
impl<E> UnwindSafe for AppError<E>where
E: UnwindSafe,
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