pub trait EasyPeek: Parse {
// Required methods
fn peek(lookahead1: &Lookahead1<'_>) -> bool;
fn peek_stream(stream: ParseStream<'_>) -> bool;
}
Expand description
Provides interface for peeking first token before parsing.
May be implemented for complex structures by peeking first field.
Required Methods§
sourcefn peek(lookahead1: &Lookahead1<'_>) -> bool
fn peek(lookahead1: &Lookahead1<'_>) -> bool
Peek head token before parsing.
sourcefn peek_stream(stream: ParseStream<'_>) -> bool
fn peek_stream(stream: ParseStream<'_>) -> bool
Peek head token before parsing.