Module bytecodec::combinator[][src]

Encoders and decoders for combination.

These are mainly created via the methods provided by EncodeExt or DecodeExt traits.

Structs

AndThen

Combinator for conditional decoding.

Collect

Combinator for collecting decoded items.

CollectN

Combinator for decoding the specified number of items and collecting the result.

Last

Combinator for representing encoders that accepts only one additional item.

Length

Combinator for consuming the specified number of bytes exactly.

Map

Combinator for converting decoded items to other values.

MapErr

Combinator for modifying encoding/decoding errors.

MapFrom

Combinator for converting items into ones that suited to the inner encoder by calling the given function.

MaxBytes

Combinator that will fail if the number of consumed bytes exceeds the specified size.

MaybeEos

Combinator for ignoring EOS if there is no item being decoded.

Omittable

Combinator for representing optional decoders.

Optional

Combinator for representing an optional encoder.

Peekable

Combinator that enables to peek decoded items before calling finish_decoding method.

PreEncode

Combinator for pre-encoding items when start_encoding method is called.

Repeat

Combinator for repeating encoding of E::Item.

Slice

Combinator for slicing an input/output byte sequence by the specified number of bytes.

TryMap

Combinator which tries to convert decoded values by calling the specified function.

TryMapFrom

Combinator that tries to convert items into ones that suited to the inner encoder by calling the given function.