Function regex_automata::util::wire::write_version
source ยท pub(crate) fn write_version<E: Endian>(
version: u32,
dst: &mut [u8],
) -> Result<usize, SerializeError>
Expand description
Writes the given version number to the beginning of the given slice.
This is useful for writing into the header of a serialized object. It can be read during deserialization as a sanity check to ensure that the library code supports the format of the serialized object.
Upon success, the total number of bytes written is returned.