pub fn any_send_partial_state<P>(p: P) -> AnySendPartialStateParser<P>
Expand description
Returns a parser where P::PartialState
is boxed. Useful as a way to avoid writing the type
since it can get very large after combining a few parsers.
parser! {
type PartialState = AnySendPartialState;
fn example[I]()(I) -> (char, char)
where [ I: Stream<Item = char> ]
{
any_send_partial_state((letter(), letter()))
}
}
assert_eq!(
example().easy_parse("ab"),
Ok((('a', 'b'), ""))
);