Macro nom::into [−][src]
macro_rules! into { ($i:expr, $submac:ident!( $($args:tt)* )) => { ... }; ($i:expr, $f:expr) => { ... }; }
into!(I -> IResult<I, O1, E1>) => I -> IResult<I, O2, E2>
automatically converts the child parser’s result to another type
it will be able to convert the output value and the error value
as long as the Into
implementations are available
named!(parse_to_str<&str, &str>, take!(4)); named!(parse_to_vec<&str, Vec<u8>>, into!(parse_to_str));