simple_endian 0.4.10

A create for defining endianness within your data structures, to make handling portable data structures simpler.
Documentation
#![cfg(all(feature = "derive", feature = "text_fixed", feature = "text_utf16"))]

use simple_endian::Endianize;

#[test]
fn endianize_text_padding_generates_fixed_types() {
    #[derive(Endianize)]
    #[endian(be)]
    #[repr(C)]
    #[allow(dead_code)]
    struct Packet {
        id: u32,

        #[text(utf16, units = 8, pad = "space")]
        title: String,
    }

    // The generated wire type should use the fixed, padded UTF16BE type.
    let _wire = PacketWire {
        id: 1u32.into(),
        title: "HI".try_into().unwrap(),
    };
}