#[non_exhaustive]pub enum Error {
Show 13 variants
Io(Error),
FromUtf8(FromUtf8Error),
Nul(NulError),
TryFromInt(TryFromIntError),
Borrow(BorrowError),
Discriminant,
TagConvert,
Poison,
Underrun {
read_bits: u64,
available_bits: u64,
},
EncodeSkipped,
Magic(&'static [u8]),
Boxed(Box<dyn Error + Send + Sync>),
Other(&'static str),
}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.
Io(Error)
FromUtf8(FromUtf8Error)
Available on crate feature
alloc only.Nul(NulError)
Available on crate feature
alloc only.TryFromInt(TryFromIntError)
Borrow(BorrowError)
Discriminant
TagConvert
Poison
Available on crate feature
std only.Underrun
EncodeSkipped
Magic(&'static [u8])
Boxed(Box<dyn Error + Send + Sync>)
Available on crate feature
alloc only.A catch-all for errors generated by user code
Other(&'static str)
A catch-all for error generated by user code, with a static message
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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 From<BorrowError> for Error
impl From<BorrowError> for Error
Source§fn from(value: BorrowError) -> Self
fn from(value: BorrowError) -> Self
Converts to this type from the input type.
Source§impl From<FromUtf8Error> for Error
Available on crate feature alloc only.
impl From<FromUtf8Error> for Error
Available on crate feature
alloc only.Source§fn from(value: FromUtf8Error) -> Self
fn from(value: FromUtf8Error) -> Self
Converts to this type from the input type.
Source§impl From<Infallible> for Error
impl From<Infallible> for Error
Source§fn from(_: Infallible) -> Self
fn from(_: Infallible) -> Self
Converts to this type from the input type.
Source§impl<T> From<PoisonError<T>> for Error
Available on crate feature std only.
impl<T> From<PoisonError<T>> for Error
Available on crate feature
std only.Source§fn from(_: PoisonError<T>) -> Self
fn from(_: PoisonError<T>) -> Self
Converts to this type from the input type.
Source§impl From<TryFromIntError> for Error
impl From<TryFromIntError> for Error
Source§fn from(value: TryFromIntError) -> Self
fn from(value: TryFromIntError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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