Function regex_automata::util::wire::skip_initial_padding
source ยท pub(crate) fn skip_initial_padding(slice: &[u8]) -> usize
Expand description
Reads a possibly empty amount of padding, up to 7 bytes, from the beginning of the given slice. All padding bytes must be NUL bytes.
This is useful because it can be theoretically necessary to pad the beginning of a serialized object with NUL bytes to ensure that it starts at a correctly aligned address. These padding bytes should come immediately before the label.
This returns the number of bytes read from the given slice.