pub fn lit_slice<T>(lit: &[T]) -> LitSlice<'_, T>Expand description
Match given data.
Example
let head = re::lit_slice(&[0xff, 0xff]);
let mut ctx = BytesCtx::new(&[0xff, 0xff, 0x12]);
assert_eq!(ctx.try_mat(&head)?, Span::new(0, 2));
Ok(())