Trait nommy::Parse [−][src]
An interface for creating and composing parsers Takes in a Buffer iterator and consumes a subset of it, Returning Self if it managed to parse ok, otherwise returning a meaningful error Parse can be derived for some types
use nommy::{Parse, IntoBuf, text::Tag}; let mut buffer = ".".chars().into_buf(); Tag::<".">::parse(&mut buffer).unwrap();
Required methods
Loading content...Implementations on Foreign Types
impl<P: Parse<T>, T: Clone> Parse<T> for Option<P>
[src]
Result is None if parsing P fails, otherwise, result is Some(p)
impl<P: Parse<T>, T: Clone> Parse<T> for Vec<P>
[src]
Repeatedly attempts to parse P, Result is all successful attempts
impl<P: Parse<T>, T, const N: usize> Parse<T> for [P; N]
[src]
Parse P N times into [P; N], fails if any step fails
use nommy::{parse, text::Tag}; let _: [Tag<".">; 3] = parse("...".chars()).unwrap();
Implementors
impl Parse<char> for LineEnding
[src]
impl Parse<char> for Space
[src]
impl Parse<char> for WhiteSpace
[src]
impl<P: Parse<T>, Suffix: Parse<T>, T> Parse<T> for SuffixedBy<P, Suffix>
[src]
Define Parse for SuffixedBy
. Parse Suffix then parse P
impl<P: Parse<T>, T: Clone> Parse<T> for Vec1<P>
[src]
Repeatedly attempt to parse P, Result is all successful attempts Must parse P at least once
impl<Prefix: Parse<T>, P: Parse<T>, Suffix: Parse<T>, T> Parse<T> for SurroundedBy<Prefix, P, Suffix>
[src]
Define Parse for SurroundedBy
. Parse Prefix then parse P
impl<Prefix: Parse<T>, P: Parse<T>, T> Parse<T> for PrefixedBy<Prefix, P>
[src]
Define Parse for PrefixedBy
. Parse Prefix then parse P