# Enum rlp::DecoderError [−] [src]

    pub enum DecoderError {
        FromBytesError(FromBytesError),
        RlpIsTooBig,
        RlpIsTooShort,
        RlpExpectedToBeList,
        RlpExpectedToBeData,
        RlpIncorrectListLen,
        RlpDataLenWithZeroPrefix,
        RlpListLenWithZeroPrefix,
        RlpInvalidIndirection,
        RlpInconsistentLengthAndData,
        Custom(&'static str),
    }

Error concerning the RLP decoder.

## Variants

`FromBytesError(FromBytesError)`

Couldn't convert given bytes to an instance of required type.

`RlpIsTooBig`

Data has additional bytes at the end of the valid RLP fragment.

`RlpIsTooShort`

Data has too few bytes for valid RLP.

`RlpExpectedToBeList`

Expect an encoded list, RLP was something else.

`RlpExpectedToBeData`

Expect encoded data, RLP was something else.

`RlpIncorrectListLen`

Expected a different size list.

`RlpDataLenWithZeroPrefix`

Data length number has a prefixed zero byte, invalid for numbers.

`RlpListLenWithZeroPrefix`

List length number has a prefixed zero byte, invalid for numbers.

`RlpInvalidIndirection`

Non-canonical (longer than necessary) representation used for data or list.

`RlpInconsistentLengthAndData`

Declared length is inconsistent with data specified after.

`Custom(&'static str)`

Custom rlp decoding error.

## Trait Implementations

### `impl Debug for DecoderError`
[src]

#### `fn fmt(&self, __arg_0: &mut Formatter) -> Result`

Formats the value using the given formatter.

### `impl PartialEq for DecoderError`
[src]

#### `fn eq(&self, __arg_0: &DecoderError) -> bool`

This method tests for `self` and `other` values to be equal, and is used by `==`. Read more

#### `fn ne(&self, __arg_0: &DecoderError) -> bool`

This method tests for `!=`.

### `impl Eq for DecoderError`
[src]

### `impl StdError for DecoderError`
[src]

#### `fn description(&self) -> &str`

A short description of the error. Read more

#### `fn cause(&self) -> Option<&Error>`
1.0.0

The lower-level cause of this error, if any. Read more

### `impl Display for DecoderError`
[src]

#### `fn fmt(&self, f: &mut Formatter) -> Result`

Formats the value using the given formatter.

### `impl From<FromBytesError> for DecoderError`
[src]

#### `fn from(err: FromBytesError) -> DecoderError`

Performs the conversion.

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result
+
  Collapse/expand all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)