Function utils::parser::noop

source ·
pub fn noop() -> Constant<()>
Expand description

Parser that consumes no input and always succeeds, returning ().

§Examples

assert_eq!(
    parser::noop().parse(b"abc"),
    Ok(((), &b"abc"[..]))
);