pub enum Error {
Invalid,
Unsupported,
LengthExceedsMax,
LengthMismatch,
NonZeroPadding,
Utf8Error(Utf8Error),
InvalidHex,
Io(Error),
DepthLimitExceeded,
Json(Error),
LengthLimitExceeded,
}
Available on crate feature
next
only.Expand description
Error contains all errors returned by functions in this crate. It can be
compared via PartialEq
, however any contained IO errors will only be
compared on their ErrorKind
.
Variants§
Invalid
Unsupported
LengthExceedsMax
LengthMismatch
NonZeroPadding
Utf8Error(Utf8Error)
InvalidHex
Available on crate feature
alloc
only.Io(Error)
Available on crate feature
std
only.DepthLimitExceeded
Json(Error)
Available on crate feature
serde_json
only.LengthLimitExceeded
Trait Implementations§
Source§impl Error for Error
Available on crate feature std
only.
impl Error for Error
Available on crate feature
std
only.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<DecodeError> for Error
Available on crate feature alloc
only.
impl From<DecodeError> for Error
Available on crate feature
alloc
only.Source§fn from(_: DecodeError) -> Self
fn from(_: DecodeError) -> 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(e: FromUtf8Error) -> Self
fn from(e: FromUtf8Error) -> Self
Converts to this type from the input type.
Source§impl From<TryFromSliceError> for Error
impl From<TryFromSliceError> for Error
Source§fn from(_: TryFromSliceError) -> Error
fn from(_: TryFromSliceError) -> Error
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