pub struct Failure {
pub check: &'static str,
pub detail: String,
}Expand description
A broken rule.
Fields§
§check: &'static strThe check that failed.
detail: StringWhat went wrong.
Trait Implementations§
impl Eq for Failure
Source§impl Error for Failure
impl Error for Failure
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()
impl StructuralPartialEq for Failure
Auto Trait Implementations§
impl Freeze for Failure
impl RefUnwindSafe for Failure
impl Send for Failure
impl Sync for Failure
impl Unpin for Failure
impl UnsafeUnpin for Failure
impl UnwindSafe for Failure
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,
§impl<E> CodecErrorExt for Ewhere
E: Error + 'static,
impl<E> CodecErrorExt for Ewhere
E: Error + 'static,
§fn unsupported_operation(&self) -> Option<&UnsupportedOperation>
fn unsupported_operation(&self) -> Option<&UnsupportedOperation>
Find an [
UnsupportedOperation] in this error’s cause chain.§fn limit_exceeded(&self) -> Option<&LimitExceeded>
fn limit_exceeded(&self) -> Option<&LimitExceeded>
Find a [
LimitExceeded] in this error’s cause chain.§fn codec_error(&self) -> Option<&CodecError>
fn codec_error(&self) -> Option<&CodecError>
Recover the shared [
CodecError] envelope from this error’s chain — after
any erasure (Box<dyn Error>, anyhow::Error, a mapped wrapper) — by
downcasting to the concrete At<CodecError> (or a bare CodecError),
tolerating a single Box layer (Box<At<CodecError>> etc., so a codec may
use an 8-byte boxed type Error). It gives the
category and the originating
codec name, so a consumer can tell codecs apart
without naming any codec-specific type. Read more§fn find_cause<T>(&self) -> Option<&T>where
T: Error + 'static,
fn find_cause<T>(&self) -> Option<&T>where
T: Error + 'static,
Find a cause of arbitrary type
T in this error’s cause chain.§fn error_category(&self) -> Option<ErrorCategory>
fn error_category(&self) -> Option<ErrorCategory>
Shortcut for
codec_error().map(CodecError::category) — the
coarse axis app/lib code routes on.