pub fn bytes(slice: &[u8]) -> ByteSlice<'_>
Returns a pattern that will match slice if it occurs at the start of the input.
slice
use bparse::{Pattern, bytes}; let pattern = bytes(&[1]); assert_eq!(pattern.eval(&[1, 2, 3]), Some(1));