Struct prae::MutationError
source · [−]pub struct MutationError<W: Wrapper> {
pub old_value: W::Inner,
pub new_value: W::Inner,
pub original: W::Error,
}
Expand description
A wrapper-error that will be returned if the
Wrapper::mutate
method receives a closure that
mutates the inner value in such a way that it no longer passes
the Wrapper::PROCESS
function.
This wrapper contains the mutated value that caused the error, the
value before the mutation and the original error returned by
Wrapper::PROCESS
function.
Fields
old_value: W::Inner
Value before the mutation.
new_value: W::Inner
Value after mutation (the cause of the error).
original: W::Error
Original error.
Trait Implementations
sourceimpl<W: Debug + Wrapper> Debug for MutationError<W> where
W::Inner: Debug,
W::Inner: Debug,
W::Error: Debug,
impl<W: Debug + Wrapper> Debug for MutationError<W> where
W::Inner: Debug,
W::Inner: Debug,
W::Error: Debug,
sourceimpl<W> Error for MutationError<W> where
W: Wrapper + Debug,
W::Inner: Debug,
W::Error: Display + Debug,
impl<W> Error for MutationError<W> where
W: Wrapper + Debug,
W::Inner: Debug,
W::Error: Display + Debug,
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
🔬 This is a nightly-only experimental API. (
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎 Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations
impl<W> RefUnwindSafe for MutationError<W> where
<W as Wrapper>::Error: RefUnwindSafe,
<W as Wrapper>::Inner: RefUnwindSafe,
impl<W> Send for MutationError<W> where
<W as Wrapper>::Error: Send,
<W as Wrapper>::Inner: Send,
impl<W> Sync for MutationError<W> where
<W as Wrapper>::Error: Sync,
<W as Wrapper>::Inner: Sync,
impl<W> Unpin for MutationError<W> where
<W as Wrapper>::Error: Unpin,
<W as Wrapper>::Inner: Unpin,
impl<W> UnwindSafe for MutationError<W> where
<W as Wrapper>::Error: UnwindSafe,
<W as Wrapper>::Inner: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more