Struct bytecodec::StartDecoderChain [] [src]

pub struct StartDecoderChain;

An object for starting a chain of decoders.

Examples

use bytecodec::{Decode, DecodeBuf, DecodeExt, StartDecoderChain};
use bytecodec::fixnum::U8Decoder;

let mut decoder = StartDecoderChain
    .chain(U8Decoder::new())
    .chain(U8Decoder::new())
    .chain(U8Decoder::new());

let mut input = DecodeBuf::new(b"foobar");

let item = decoder.decode(&mut input).unwrap();
assert_eq!(item, Some((b'f', b'o', b'o')));

let item = decoder.decode(&mut input).unwrap();
assert_eq!(item, Some((b'b', b'a', b'r')));

Methods

impl StartDecoderChain
[src]

[src]

Starts decoders chain.

Trait Implementations

impl Debug for StartDecoderChain
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations