pub enum ErrBoxCheckFailure {
ResultIsNotErr,
DowncastFailed,
NotEqual {
expected: String,
actual: String,
},
}
Expand description
Unsuccessful outcome of check_err_box.
Variants§
ResultIsNotErr
DowncastFailed
If the wrapped Error cannot be downcast to the expected error type.
NotEqual
Trait Implementations§
Source§impl Clone for ErrBoxCheckFailure
impl Clone for ErrBoxCheckFailure
Source§fn clone(&self) -> ErrBoxCheckFailure
fn clone(&self) -> ErrBoxCheckFailure
Returns a copy 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 ErrBoxCheckFailure
impl Debug for ErrBoxCheckFailure
Source§impl Display for ErrBoxCheckFailure
use dyn_error::*;
assert_eq!(
ErrBoxCheckFailure::ResultIsNotErr.to_string(),
"The result is not Err."
);
assert_eq!(
ErrBoxCheckFailure::DowncastFailed.to_string(),
"The boxed error cannot be downcast to the expected type."
);
assert_eq!(
ErrBoxCheckFailure::NotEqual {
expected: "EXP".to_string(),
actual: "ACT".to_string()
}.to_string(),
"Expected error: 'EXP', actual error: 'ACT'."
);
impl Display for ErrBoxCheckFailure
use dyn_error::*;
assert_eq!(
ErrBoxCheckFailure::ResultIsNotErr.to_string(),
"The result is not Err."
);
assert_eq!(
ErrBoxCheckFailure::DowncastFailed.to_string(),
"The boxed error cannot be downcast to the expected type."
);
assert_eq!(
ErrBoxCheckFailure::NotEqual {
expected: "EXP".to_string(),
actual: "ACT".to_string()
}.to_string(),
"Expected error: 'EXP', actual error: 'ACT'."
);
Source§impl Error for ErrBoxCheckFailure
impl Error for ErrBoxCheckFailure
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 Hash for ErrBoxCheckFailure
impl Hash for ErrBoxCheckFailure
Source§impl Ord for ErrBoxCheckFailure
impl Ord for ErrBoxCheckFailure
Source§fn cmp(&self, other: &ErrBoxCheckFailure) -> Ordering
fn cmp(&self, other: &ErrBoxCheckFailure) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ErrBoxCheckFailure
impl PartialEq for ErrBoxCheckFailure
Source§impl PartialOrd for ErrBoxCheckFailure
impl PartialOrd for ErrBoxCheckFailure
impl Eq for ErrBoxCheckFailure
impl StructuralPartialEq for ErrBoxCheckFailure
Auto Trait Implementations§
impl Freeze for ErrBoxCheckFailure
impl RefUnwindSafe for ErrBoxCheckFailure
impl Send for ErrBoxCheckFailure
impl Sync for ErrBoxCheckFailure
impl Unpin for ErrBoxCheckFailure
impl UnwindSafe for ErrBoxCheckFailure
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