Struct bytecodec::StartDecoderChain [] [src]

pub struct StartDecoderChain;

An object for starting a chain of decoders.

Examples

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

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

let mut input = &b"foobar"[..];

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

let item = decoder.decode_exact(&mut input).unwrap();
assert_eq!(item, (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