pub struct AssertFailure { /* private fields */ }Expand description
An error describing a failed assertion.
This struct implements the std::error::Error trait.
Implementations§
Source§impl AssertFailure
impl AssertFailure
Sourcepub fn description(&self) -> Option<&String>
pub fn description(&self) -> Option<&String>
Returns the description of the assertion that failed.
Sourcepub fn location(&self) -> Option<&OwnedLocation>
pub fn location(&self) -> Option<&OwnedLocation>
Returns the location of the assertion in the source code / test code if
it has been set in the Spec.
Trait Implementations§
Source§impl Clone for AssertFailure
impl Clone for AssertFailure
Source§fn clone(&self) -> AssertFailure
fn clone(&self) -> AssertFailure
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 moreSource§impl Debug for AssertFailure
impl Debug for AssertFailure
Source§impl Display for AssertFailure
impl Display for AssertFailure
Source§impl Error for AssertFailure
impl Error for AssertFailure
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl PartialEq for AssertFailure
impl PartialEq for AssertFailure
impl Eq for AssertFailure
impl StructuralPartialEq for AssertFailure
Auto Trait Implementations§
impl Freeze for AssertFailure
impl RefUnwindSafe for AssertFailure
impl Send for AssertFailure
impl Sync for AssertFailure
impl Unpin for AssertFailure
impl UnwindSafe for AssertFailure
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.