Struct bip_peer::PeerProtocolCodec [] [src]

pub struct PeerProtocolCodec<P> { /* fields omitted */ }

Codec operating over some PeerProtocol.

Methods

impl<P> PeerProtocolCodec<P>
[src]

[src]

Create a new PeerProtocolCodec.

It is strongly recommended to use PeerProtocolCodec::with_max_payload instead of this function, as this function will not enforce a limit on received payload length.

[src]

Create a new PeerProtocolCodec which will yield an error if receiving a payload larger than the specified max_payload.

Trait Implementations

impl<P> Decoder for PeerProtocolCodec<P> where
    P: PeerProtocol
[src]

The type of decoded frames.

The type of unrecoverable frame decoding errors. Read more

[src]

Attempts to decode a frame from the provided buffer of bytes. Read more

[src]

A default method available to be called when there are no more bytes available to be read from the underlying I/O. Read more

impl<P> Encoder for PeerProtocolCodec<P> where
    P: PeerProtocol
[src]

The type of items consumed by the Encoder

The type of encoding errors. Read more

[src]

Encodes a frame into the buffer provided. Read more