Module postcard::fixint::be

source ·
Expand description

Use with the #[serde(with = "postcard::fixint::be")] 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 Big Endian order on the wire.

pub struct DefinitelyBigEndian {
    #[serde(with = "postcard::fixint::be")]
    x: u16,


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