pub enum DecodeError {
TypeIdNotFound(String),
TypeResolvingError(String),
CannotDecodeCompactIntoType,
InvalidStr(Utf8Error),
InvalidChar(u32),
NotEnoughInput,
VariantNotFound(u8),
CodecError(Error),
Unexpected(Unexpected),
}
Expand description
An error decoding SCALE bytes.
Variants§
TypeIdNotFound(String)
Type ID was not found
TypeResolvingError(String)
A low level error trying to resolve a type.
CannotDecodeCompactIntoType
The type we’re trying to decode is supposed to be compact encoded, but that is not possible.
InvalidStr(Utf8Error)
Failure to decode bytes into a string.
InvalidChar(u32)
NotEnoughInput
We expected more bytes to finish decoding, but could not find them.
VariantNotFound(u8)
We found a variant that does not match with any in the type we’re trying to decode from.
CodecError(Error)
Some error emitted from a codec::Decode
impl.
Unexpected(Unexpected)
This is returned by default if a visitor function is not implemented.
Trait Implementations§
Source§impl Clone for DecodeError
impl Clone for DecodeError
Source§fn clone(&self) -> DecodeError
fn clone(&self) -> DecodeError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DecodeError
impl Debug for DecodeError
Source§impl Display for DecodeError
impl Display for DecodeError
Source§impl Error for DecodeError
impl Error for DecodeError
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
impl From<DecodeError> for Error
Source§fn from(err: DecodeError) -> Error
fn from(err: DecodeError) -> Error
Converts to this type from the input type.
Source§impl From<DecodeError> for ErrorKind
impl From<DecodeError> for ErrorKind
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for DecodeError
impl From<Error> for DecodeError
Source§impl From<Unexpected> for DecodeError
impl From<Unexpected> for DecodeError
Source§fn from(source: Unexpected) -> Self
fn from(source: Unexpected) -> Self
Converts to this type from the input type.
Source§impl PartialEq for DecodeError
impl PartialEq for DecodeError
impl Eq for DecodeError
impl StructuralPartialEq for DecodeError
Auto Trait Implementations§
impl Freeze for DecodeError
impl RefUnwindSafe for DecodeError
impl Send for DecodeError
impl Sync for DecodeError
impl Unpin for DecodeError
impl UnwindSafe for DecodeError
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