Trait proc_easy::EasyPeek

source ·
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§

source

fn peek(lookahead1: &Lookahead1<'_>) -> bool

Peek head token before parsing.

source

fn peek_stream(stream: ParseStream<'_>) -> bool

Peek head token before parsing.

Implementors§

source§

impl EasyPeek for Argwhere for<'a> EasyPeekHack<'a, arg>: EasyPeek,

source§

impl EasyPeek for Bazwhere for<'a> EasyPeekHack<'a, Member>: EasyPeek,

source§

impl EasyPeek for Foowhere for<'a> EasyPeekHack<'a, Ident>: EasyPeek,

source§

impl EasyPeek for Outer

source§

impl<T> EasyPeek for EasyBraced<T>where T: Parse,

source§

impl<T> EasyPeek for EasyBracketed<T>where T: Parse,

source§

impl<T> EasyPeek for EasyParenthesized<T>where T: Parse,

source§

impl<T> EasyPeek for Twhere T: Token + Parse,

source§

impl<T, P> EasyPeek for EasySeparated<T, P>where T: EasyPeek, P: EasyPeek,

source§

impl<V, T> EasyPeek for EasySubArgument<V, T>where V: Parse, T: Parse,