[][src]Module rcodec::codec

Structs

DecoderResult

A result type, consisting of a decoded value and any unconsumed data, returned by decode operations.

Constants

int8

Signed 8-bit integer codec.

int16

Big-endian signed 16-bit integer codec.

int16_l

Little-endian signed 16-bit integer codec.

int32

Big-endian signed 32-bit integer codec.

int32_l

Little-endian signed 32-bit integer codec.

int64

Big-endian signed 64-bit integer codec.

int64_l

Little-endian signed 64-bit integer codec.

uint8

Unsigned 8-bit integer codec.

uint16

Big-endian unsigned 16-bit integer codec.

uint16_l

Little-endian unsigned 16-bit integer codec.

uint32

Big-endian unsigned 32-bit integer codec.

uint32_l

Little-endian unsigned 32-bit integer codec.

uint64

Big-endian unsigned 64-bit integer codec.

uint64_l

Little-endian unsigned 64-bit integer codec.

Traits

Codec

Implements encoding and decoding of values of type Value.

Functions

bytes

Byte vector codec.

constant

Codec that always encodes the given byte vector, and decodes by returning a unit result if the actual bytes match the given byte vector or an error otherwise.

drop_left

Codec that encodes/decodes the unit value followed by the right-hand value, discarding the unit value when decoding.

eager

Codec that encodes/decodes fully-realized Vec<u8> values.

fixed_size_bytes

Codec that limits the number of bytes that are available to the given codec.

hlist_flat_prepend_codec

Codec that first performs encoding/decoding of T, using the resulting value to produce codecs for the remaining types.

hlist_prepend_codec

Codec used to convert an HList of codecs into a single codec that encodes/decodes an HList of values.

hnil_codec

Codec for HNil type.

identity_bytes

Identity byte vector codec.

ignore

Codec that encodes len low bytes and decodes by discarding len bytes.

struct_codec

Codec for structs that support HList conversions.

variable_size_bytes

Codec for length-delimited values.

with_context

Codec that injects additional context (e.g. in error messages) into the given codec.

Type Definitions

DecodeResult

A result type returned by decode operations.

EncodeResult

A result type returned by encode operations.