Module postcard::fixint

source ·
Expand description

§Fixed Size Integers

In some cases, the use of variably length encoded data may not be preferrable. These modules, for use with #[serde(with = ...)] “opt out” of variable length encoding.

Support explicitly not provided for usize or isize, as these types would not be portable between systems of different pointer widths.

Although all data in Postcard is typically encoded in little-endian order, these modules provide a choice to the user to encode the data in either little or big endian form, which may be useful for zero-copy applications.

Modules§

  • Disables varint serialization/deserialization for the specified integer field.
  • Use with the #[serde(with = "postcard::fixint::le")] field attribute.