pub struct AssertionResult { /* private fields */ }
Expand description
Contains assertion results which will be shown in the assertion messages.
Implementations§
Source§impl AssertionResult
impl AssertionResult
pub fn add_fact<K: Into<String>, V: Into<String>>( self, key: K, value: V, ) -> Self
pub fn add_formatted_fact<K: Into<String>, V: Debug>( self, key: K, value: V, ) -> Self
pub fn add_formatted_values_fact<K: Into<String>, V: Debug>( self, key: K, values: Vec<V>, ) -> Self
pub fn add_simple_formatted_fact<V: Debug>(self, value: V) -> Self
pub fn add_simple_fact<V: Into<String>>(self, value: V) -> Self
pub fn add_splitter(self) -> Self
Sourcepub fn generate_message(&self) -> String
pub fn generate_message(&self) -> String
Generates an assertion message from the assertion result.
pub fn facts(&self) -> &Vec<Fact>
Trait Implementations§
Source§impl AssertionStrategy<()> for AssertionResult
impl AssertionStrategy<()> for AssertionResult
Source§impl AssertionStrategy<CheckThatResult> for AssertionResult
impl AssertionStrategy<CheckThatResult> for AssertionResult
Source§fn do_fail(self) -> CheckThatResult
fn do_fail(self) -> CheckThatResult
Behavior when assertion fails.
Source§fn do_ok(self) -> CheckThatResult
fn do_ok(self) -> CheckThatResult
Behavior when assertion passes.
Source§impl Clone for AssertionResult
impl Clone for AssertionResult
Source§fn clone(&self) -> AssertionResult
fn clone(&self) -> AssertionResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for AssertionResult
impl RefUnwindSafe for AssertionResult
impl Send for AssertionResult
impl Sync for AssertionResult
impl Unpin for AssertionResult
impl UnwindSafe for AssertionResult
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