pub struct AssertFormat<'a> { /* private fields */ }
Expand description
Functionality for testing Debug
or Display
implementations.
Implementations§
Source§impl<'a> AssertFormat<'a>
impl<'a> AssertFormat<'a>
Sourcepub fn remaining_expected(&self) -> usize
pub fn remaining_expected(&self) -> usize
Indicates how many of the expected bytes remain to be written for a success case.
Sourcepub fn assert_display_fmt<D>(instance: D, expected: &str)where
D: Display,
pub fn assert_display_fmt<D>(instance: D, expected: &str)where
D: Display,
Asserts that the Display
trait is correctly implemented.
§Panics
This call panics if the output generated by the Display
implementation
differs from the expected
value.
Sourcepub fn assert_debug_fmt<D>(instance: D, expected: &str)where
D: Debug,
pub fn assert_debug_fmt<D>(instance: D, expected: &str)where
D: Debug,
Asserts that the Debug
trait is correctly implemented.
§Panics
This call panics if the output generated by the Debug
implementation
differs from the expected
value.
Trait Implementations§
Source§impl<'a> Debug for AssertFormat<'a>
impl<'a> Debug for AssertFormat<'a>
Auto Trait Implementations§
impl<'a> Freeze for AssertFormat<'a>
impl<'a> RefUnwindSafe for AssertFormat<'a>
impl<'a> Send for AssertFormat<'a>
impl<'a> Sync for AssertFormat<'a>
impl<'a> Unpin for AssertFormat<'a>
impl<'a> UnwindSafe for AssertFormat<'a>
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