Expand description

The config module is used to change the behavior of bincode’s encoding and decoding logic.

Important make sure you use the same config for encoding and decoding, or else bincode will not work properly.

To use a config, first create a type of Configuration. This type will implement trait Config for use with bincode.

let config = bincode::config::standard()
    // pick one of:
    .with_big_endian()
    .with_little_endian()
    // pick one of:
    .with_variable_int_encoding()
    .with_fixed_int_encoding()
    // pick one of:
    .skip_fixed_array_length()
    .write_fixed_array_length();

See Configuration for more information on the configuration options.

Structs

The Configuration struct is used to build bincode configurations. The Config trait is implemented by this struct when a valid configuration has been constructed.

Traits

Indicates a type is valid for controlling the bincode configuration

Functions

Creates the “legacy” default config. This is the default config that was present in bincode 1.0

The default config for bincode 2.0. By default this will be: