#[non_exhaustive]pub enum DecodeError {
Show 14 variants
InputTooLarge,
TrailingBytes,
DecoderOverread,
Malformed,
UnexpectedList,
UnexpectedScalar,
ListTooLong,
NestingTooDeep,
AllocationExceeded,
ProofTooLarge,
ItemCountExceeded,
UnreviewedDeploymentPolicy,
LengthOverflow,
OffsetOutOfBounds,
}Expand description
Shared decode failure categories.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InputTooLarge
The byte input is larger than the active decode budget.
TrailingBytes
The input contains trailing bytes after a decoded value.
DecoderOverread
A decoder reported consuming more bytes than the input contains.
Malformed
The input is malformed for the selected wire format.
UnexpectedList
An RLP list was encountered where a scalar byte string was required.
UnexpectedScalar
An RLP scalar was encountered where a list was required.
ListTooLong
A decoded list contains more items than the active list budget.
NestingTooDeep
Decoding exceeded the active nesting-depth budget.
AllocationExceeded
A decoder requested allocation beyond the active allocation budget.
ProofTooLarge
A proof contains more nodes than the active proof-node budget.
ItemCountExceeded
A decoder visited more items than the active cumulative item budget.
UnreviewedDeploymentPolicy
A deployment used an unchanged starter budget policy.
LengthOverflow
Length or offset arithmetic overflowed.
OffsetOutOfBounds
An offset or range points outside the input.
Implementations§
Source§impl DecodeError
impl DecodeError
Sourcepub const fn category(self) -> DecodeErrorCategory
pub const fn category(self) -> DecodeErrorCategory
Stable high-level category for policy decisions.
Sourcepub const fn resource(self) -> Option<ResourceError>
pub const fn resource(self) -> Option<ResourceError>
Returns the resource budget that was exceeded, if this is a resource exhaustion error.
Trait Implementations§
Source§impl Clone for DecodeError
impl Clone for DecodeError
Source§fn clone(&self) -> DecodeError
fn clone(&self) -> DecodeError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for DecodeError
Source§impl Debug for DecodeError
impl Debug for DecodeError
Source§impl Display for DecodeError
impl Display for DecodeError
impl Eq for DecodeError
Source§impl From<DecodeError> for RlpDeriveError
impl From<DecodeError> for RlpDeriveError
Source§fn from(error: DecodeError) -> Self
fn from(error: DecodeError) -> Self
Source§impl PartialEq for DecodeError
impl PartialEq for DecodeError
Source§fn eq(&self, other: &DecodeError) -> bool
fn eq(&self, other: &DecodeError) -> bool
self and other values to be equal, and is used by ==.