Macro nom::complete[][src]

macro_rules! complete {
    ($i:expr, $submac:ident!( $($args:tt)* )) => { ... };
    ($i:expr, $f:expr) => { ... };
}

replaces a Incomplete returned by the child parser with an Error

    named!(take_5, complete!(take!(5)));

    let a = &b"abcd"[..];
    let res_a = take_5(a);
    assert_eq!(res_a, Err(Err::Error(error_position!(a, ErrorKind::Complete))));