pub fn constant<T: Copy>(v: T) -> Constant<T>
Parser that consumes no input and always succeeds, returning the provided value.
assert_eq!( parser::constant(1).parse(b"abc"), Ok((1, &b"abc"[..])) );