#[non_exhaustive]pub enum Class {
Validation,
Corruption,
NotFound,
Retryable,
ResourceExhaustion(ResourceExhaustionKind),
Io(ErrorKind),
Tagged(&'static str),
}Expand description
The semantic class of an error.
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.
Validation
Function or method input was invalid.
Corruption
Stored or streamed data was malformed or internally inconsistent.
NotFound
A requested resource does not exist.
Retryable
Retrying the operation may succeed.
ResourceExhaustion(ResourceExhaustionKind)
A finite resource was exhausted.
Io(ErrorKind)
An I/O failure not normalized to another semantic class.
Tagged(&'static str)
An operation-specific condition identified by a stable, namespaced string.
Functions returning this class document their tags. Tags imply no other classification;
match them with Classifications::has() instead of inspecting diagnostic text or metadata.
Trait Implementations§
impl Copy for Class
impl Eq for Class
impl StructuralPartialEq for Class
Auto Trait Implementations§
impl Freeze for Class
impl RefUnwindSafe for Class
impl Send for Class
impl Sync for Class
impl Unpin for Class
impl UnsafeUnpin for Class
impl UnwindSafe for Class
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