Function regex_automata::util::wire::read_pattern_id

source ยท
pub(crate) fn read_pattern_id(
    slice: &[u8],
    what: &'static str,
) -> Result<(PatternID, usize), DeserializeError>
Expand description

Reads a pattern ID from the given slice. If the slice has insufficient length, then this panics. If the deserialized integer exceeds the pattern ID limit for the current target, then this returns an error.

Upon success, this also returns the number of bytes read.