# Enum ethcore_light::net::Error [−] [src]

    pub enum Error {
        Rlp(DecoderError),
        Network(NetworkError),
        BufferEmpty,
        UnrecognizedPacket(u8),
        UnexpectedHandshake,
        WrongNetwork,
        UnknownPeer,
        UnsolicitedResponse,
        NotServer,
        UnsupportedProtocolVersion(u8),
        BadProtocolVersion,
        Overburdened,
    }

Kinds of errors which can be encountered in the course of LES.

## Variants

`Rlp(DecoderError)`

An RLP decoding error.

`Network(NetworkError)`

A network error.

`BufferEmpty`

Out of buffer.

`UnrecognizedPacket(u8)`

Unrecognized packet code.

`UnexpectedHandshake`

Unexpected handshake.

`WrongNetwork`

Peer on wrong network (wrong NetworkId or genesis hash)

`UnknownPeer`

Unknown peer.

`UnsolicitedResponse`

Unsolicited response.

`NotServer`

Not a server.

`UnsupportedProtocolVersion(u8)`

Unsupported protocol version.

`BadProtocolVersion`

Bad protocol version.

`Overburdened`

Peer is overburdened.

## Methods

### `impl Error`
[src]

#### `fn punishment(&self) -> Punishment`

What level of punishment does this error warrant?

## Trait Implementations

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

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

Formats the value using the given formatter.

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

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

Performs the conversion.

### `impl From<NetworkError> for Error`
[src]

#### `fn from(err: NetworkError) -> Self`

Performs the conversion.

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

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

Formats the value using the given formatter.

# 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`)