[−][src]Enum ssz::DecodeError
Returned when SSZ decoding fails.
Variants
InvalidByteLength
The bytes supplied were too short to be decoded into the specified type.
Fields of InvalidByteLength
InvalidLengthPrefix
The given bytes were too short to be read as a length prefix.
Fields of InvalidLengthPrefix
OutOfBoundsByte
A length offset pointed to a byte that was out-of-bounds (OOB).
A bytes may be OOB for the following reasons:
- It is
>= bytes.len()
. - When decoding variable length items, the 1st offset points "backwards" into the fixed
length items (i.e.,
length[0] < BYTES_PER_LENGTH_OFFSET
). - When decoding variable-length items, the
n
'th offset was less than then-1
'th offset.
Fields of OutOfBoundsByte
i: usize
BytesInvalid(String)
The given bytes were invalid for some application-level reason.
Trait Implementations
impl PartialEq<DecodeError> for DecodeError
[src]
fn eq(&self, other: &DecodeError) -> bool
[src]
fn ne(&self, other: &DecodeError) -> bool
[src]
impl Debug for DecodeError
[src]
Auto Trait Implementations
impl Send for DecodeError
impl Unpin for DecodeError
impl Sync for DecodeError
impl UnwindSafe for DecodeError
impl RefUnwindSafe for DecodeError
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,