Function cookie_factory::combinator::skip
source · pub fn skip<W: Write + Skip>(len: usize) -> impl SerializeFn<W>
Expand description
Skips over some input bytes without writing anything
use cookie_factory::{gen, combinator::skip};
let mut buf = [0u8; 100];
let (out, pos) = gen(skip(2), &mut buf[..]).unwrap();
assert_eq!(pos, 2);
assert_eq!(out.len(), 98);