Struct speculoos::AssertionFailure
source · [−]pub struct AssertionFailure<'r, T: 'r> { /* private fields */ }
Expand description
A failed assertion.
This exposes builder methods to construct the final failure message.
Implementations
sourceimpl<'r, T: DescriptiveSpec<'r>> AssertionFailure<'r, T>
impl<'r, T: DescriptiveSpec<'r>> AssertionFailure<'r, T>
sourcepub fn from_spec(spec: &'r T) -> AssertionFailure<'r, T>
pub fn from_spec(spec: &'r T) -> AssertionFailure<'r, T>
Construct a new AssertionFailure from a DescriptiveSpec.
sourcepub fn with_expected(&mut self, expected: String) -> &mut Self
pub fn with_expected(&mut self, expected: String) -> &mut Self
Builder method to add the expected value for the panic message.
sourcepub fn with_actual(&mut self, actual: String) -> &mut Self
pub fn with_actual(&mut self, actual: String) -> &mut Self
Builder method to add the actual value for the panic message.
Trait Implementations
Auto Trait Implementations
impl<'r, T> RefUnwindSafe for AssertionFailure<'r, T> where
T: RefUnwindSafe,
impl<'r, T> Send for AssertionFailure<'r, T> where
T: Sync,
impl<'r, T> Sync for AssertionFailure<'r, T> where
T: Sync,
impl<'r, T> Unpin for AssertionFailure<'r, T>
impl<'r, T> UnwindSafe for AssertionFailure<'r, T> where
T: RefUnwindSafe,
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