pub trait UniKind:
Debug
+ Any
+ Send
+ Sync {
// Provided methods
fn value(&self) -> Cow<'static, str> { ... }
fn context(&self) -> Option<Cow<'static, str>> { ... }
fn code(&self) -> i32 { ... }
fn type_name(&self) -> &'static str { ... }
}Expand description
A trait that specifies a custom error kind. Any specified to facilitate downcasting.
Provided Methods§
Sourcefn value(&self) -> Cow<'static, str>
fn value(&self) -> Cow<'static, str>
The string value of the kind, if any. This is useful for programmatic evaluation
when the type is boxed in the error chain and the type is not known. Defaults to "".
Sourcefn context(&self) -> Option<Cow<'static, str>>
fn context(&self) -> Option<Cow<'static, str>>
Returns additional context for this specific kind, if any. Defaults to None.