pub fn pack32(value: u32) -> Result<Vec<u8>>Expand description
Pack a 32-bit integer into a WTF-8 byte sequence representing a single logical codepoint.
ยงSupported Range
Despite taking a u32, only values in the Unicode / WTF-8 codepoint
range 0x0000_0000..=0x0010_FFFF (0 through 1,114,111, or
PACK32_MIN..=PACK32_MAX) are supported. This includes surrogate
codepoints 0xD800..=0xDFFF supported by WTF-8.
Values strictly greater than 0x0010_FFFF (up to u32::MAX) return an
error.
Currently a thin wrapper around WTF-8 single-codepoint encoding.
(Original: pack32)