pub struct ErrorHook {
pub error: RuntimeError,
/* private fields */
}
Expand description
The environment given to the error handler.
This deliberately does not implement Clone to make it hard to move it out of the handler, which you should not do.
The ErrorHook::critical()
method should be used to send a CriticalError
, which will
terminate watchexec. This is useful to e.g. upgrade certain errors to be fatal.
Note that returning errors from the error handler does not result in critical errors.
Fields§
§error: RuntimeError
The runtime error for which this handler was called.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ErrorHook
impl !RefUnwindSafe for ErrorHook
impl Send for ErrorHook
impl Sync for ErrorHook
impl Unpin for ErrorHook
impl !UnwindSafe for ErrorHook
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