Module postcard::fixint::le

source ·
Expand description

Use with the #[serde(with = "postcard::fixint::le")] field attribute. Disables varint serialization/deserialization for the specified integer field. The integer will always be serialized in the same way as a fixed size array, in Little Endian order on the wire.

#[derive(Serialize)]
pub struct DefinitelyLittleEndian {
    #[serde(with = "postcard::fixint::le")]
    x: u16,
}

Functions

  • Deserialize the integer value from a little-endian fixed-size array.
  • Serialize the integer value as a little-endian fixed-size array.