An interface with dealing with parser-peeking.
The required function peek takes in a Cursor iterator
and will attempt to loosely parse the data provided,
asserting that if the equivalent Buffer is given to
the Parse::parse function, it should succeed.
use nommy::{Peek, Buffer, IntoBuf, text::Tag};
let mut buffer = ".".chars().into_buf();
assert!(Tag::<".">::peek(&mut buffer.cursor()));
Loading content...Loading content...impl<Prefix: Peek<T>, P: Peek<T>, Suffix: Peek<T>, T> Peek<T> for SurroundedBy<Prefix, P, Suffix>
[src]
impl<Prefix: Peek<T>, P: Peek<T>, T> Peek<T> for PrefixedBy<Prefix, P>
[src]
impl<Suffix: Peek<T>, P: Peek<T>, T> Peek<T> for SuffixedBy<P, Suffix>
[src]
impl<const BYTES: &'static [u8]> Peek<u8> for nommy::bytes::OneOf<BYTES>
[src]
impl<const CHARS: &'static str> Peek<char> for nommy::text::AnyOf1<CHARS>
[src]
impl<const CHARS: &'static str> Peek<char> for AnyOf<CHARS>
[src]
impl<const CHARS: &'static str> Peek<char> for nommy::text::OneOf<CHARS>
[src]
impl<const CHARS: &'static str> Peek<char> for WhileNot1<CHARS>
[src]
impl<const TAG: &'static str> Peek<char> for nommy::text::Tag<TAG>
[src]
impl<const TAG: &'static [u8]> Peek<u8> for nommy::bytes::Tag<TAG>
[src]
Loading content...