pub struct NegFormat<Fmt>(pub Fmt);
Expand description
A wrapper over a formatter that negates it.
This type is a MatcherFormat
that swaps the MatchFailure::Pos
and MatchFailure::Neg
values, so if you want to write a negated version of a matcher (e.g. be_ok
vs be_err
),
you don’t have to write two formatters.
Tuple Fields§
§0: Fmt
Trait Implementations§
Auto Trait Implementations§
impl<Fmt> Freeze for NegFormat<Fmt>where
Fmt: Freeze,
impl<Fmt> RefUnwindSafe for NegFormat<Fmt>where
Fmt: RefUnwindSafe,
impl<Fmt> Send for NegFormat<Fmt>where
Fmt: Send,
impl<Fmt> Sync for NegFormat<Fmt>where
Fmt: Sync,
impl<Fmt> Unpin for NegFormat<Fmt>where
Fmt: Unpin,
impl<Fmt> UnwindSafe for NegFormat<Fmt>where
Fmt: 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