Crate deku_string

Crate deku_string 

Source
Expand description

Utility crate for Deku that provides convenient support for serializing and deserializing String and Vec in a variety of binary formats.

Some notable features:

  • StringDeku supports UTF-8, UTF-16 and UTF-32 encodings.
  • Multiple layouts such as .Net, Pascal and zero-ended.
  • Little and Big Endian support.
  • Dynamic read and write without additional temporary structs and operations.
  • No need to specify custom reader and writer functions.
  • Compatible with Deku’s derive macros and custom readers/writers.
  • Supports serde and defmt.

Read specific struct for example usage.

Structs§

SevenBitU8
Variable length 7-bit encoded u8.
SevenBitU16
Variable length 7-bit encoded u16.
SevenBitU32
Variable length 7-bit encoded u32.
SevenBitU64
Variable length 7-bit encoded u64.
SevenBitU128
Variable length 7-bit encoded u128.
StringDeku
Thin wrapper around alloc::string::String to read and write in various layouts.
VecDeku
Thin wrapper around alloc::vec::Vec<T> to read and write in various layouts.

Enums§

Encoding
String encoding to use.
Size
Size encoding for length-prefixed StringDeku and VecDeku
StringLayout
Supported string binary layouts.
VecLayout
Supported vec binary layouts.