Enum stacked_errors::ErrorKind
source · #[non_exhaustive]pub enum ErrorKind {
Show 13 variants
UnitError,
TimeoutError,
ProbablyNotRootCauseError,
StrError(&'static str),
StringError(String),
CowStrError(Cow<'static, str>),
BoxedError(Box<dyn Error + Send + Sync>),
TryFromIntError(TryFromIntError),
StdIoError(Error),
FromUtf8Error(FromUtf8Error),
FromUtf16Error(FromUtf16Error),
ParseIntError(ParseIntError),
ParseFloatError(ParseFloatError),
}Expand description
This includes BoxedError for general errors, tag errors, and directly
encoded standard library errors.
The intention with TimeoutError is that if it is in the error stack, a
timeout occured. When other timeout structs are used, this should be added
on.
ProbablyNotRootCauseError is used to signal that the error is probably not
the “root cause”. This is used by the super_orchestrator crate to reduce
noise when one error triggers a cascade of errors in a network.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UnitError
TimeoutError
ProbablyNotRootCauseError
StrError(&'static str)
StringError(String)
CowStrError(Cow<'static, str>)
BoxedError(Box<dyn Error + Send + Sync>)
TryFromIntError(TryFromIntError)
StdIoError(Error)
FromUtf8Error(FromUtf8Error)
FromUtf16Error(FromUtf16Error)
ParseIntError(ParseIntError)
ParseFloatError(ParseFloatError)
Implementations§
Trait Implementations§
source§impl Error for ErrorKind
impl Error for ErrorKind
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<FromUtf16Error> for ErrorKind
impl From<FromUtf16Error> for ErrorKind
source§fn from(e: FromUtf16Error) -> Self
fn from(e: FromUtf16Error) -> Self
Converts to this type from the input type.
source§impl From<FromUtf8Error> for ErrorKind
impl From<FromUtf8Error> for ErrorKind
source§fn from(e: FromUtf8Error) -> Self
fn from(e: FromUtf8Error) -> Self
Converts to this type from the input type.
source§impl From<ParseFloatError> for ErrorKind
impl From<ParseFloatError> for ErrorKind
source§fn from(e: ParseFloatError) -> Self
fn from(e: ParseFloatError) -> Self
Converts to this type from the input type.
source§impl From<ParseIntError> for ErrorKind
impl From<ParseIntError> for ErrorKind
source§fn from(e: ParseIntError) -> Self
fn from(e: ParseIntError) -> Self
Converts to this type from the input type.
source§impl From<TryFromIntError> for ErrorKind
impl From<TryFromIntError> for ErrorKind
source§fn from(e: TryFromIntError) -> Self
fn from(e: TryFromIntError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ErrorKind
impl !RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl !UnwindSafe for ErrorKind
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