pub struct AssertionError {
pub message: String,
pub expected: String,
pub actual: String,
}Expand description
Error type for failed assertions.
Fields§
§message: StringDescription of what was being asserted.
expected: StringThe expected value.
actual: StringThe actual value.
Implementations§
Trait Implementations§
Source§impl Debug for AssertionError
impl Debug for AssertionError
Source§impl Display for AssertionError
impl Display for AssertionError
Source§impl Error for AssertionError
impl Error for AssertionError
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 From<AssertionError> for TestError
impl From<AssertionError> for TestError
Source§fn from(source: AssertionError) -> Self
fn from(source: AssertionError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AssertionError
impl RefUnwindSafe for AssertionError
impl Send for AssertionError
impl Sync for AssertionError
impl Unpin for AssertionError
impl UnwindSafe for AssertionError
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