regex_automata::util::wire

Function read_u32

Source
pub(crate) fn read_u32(slice: &[u8]) -> u32
Expand description

Read a u32 from the beginning of the given slice in native endian format. If the slice has fewer than 4 bytes, then this panics.

Marked as inline to speed up sparse searching which decodes integers from its automaton at search time.