#[non_exhaustive]pub enum FailureRecovery<T> {
Propagate,
Recovered(T),
}Expand description
Outcome returned by “on failure” hooks, indicating whether recovery happened.
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.
Propagate
No recovery — propagate the original error.
Recovered(T)
The hook produced a substitute success result.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for FailureRecovery<T>where
T: Freeze,
impl<T> RefUnwindSafe for FailureRecovery<T>where
T: RefUnwindSafe,
impl<T> Send for FailureRecovery<T>where
T: Send,
impl<T> Sync for FailureRecovery<T>where
T: Sync,
impl<T> Unpin for FailureRecovery<T>where
T: Unpin,
impl<T> UnsafeUnpin for FailureRecovery<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for FailureRecovery<T>where
T: 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