Function regex_automata::util::wire::write_endianness_check
source ยท pub(crate) fn write_endianness_check<E: Endian>(
dst: &mut [u8],
) -> Result<usize, SerializeError>
Expand description
Writes 0xFEFF as an integer using the given endianness.
This is useful for writing into the header of a serialized object. It can be read during deserialization as a sanity check to ensure the proper endianness is used.
Upon success, the total number of bytes written is returned.