Trait ParseBufferExt

Source
pub trait ParseBufferExt {
    // Required method
    fn peek_and_consume<T, P>(&self, token: T) -> bool
       where T: Peek<Token = P>,
             P: Parse;
}

Required Methods§

Source

fn peek_and_consume<T, P>(&self, token: T) -> bool
where T: Peek<Token = P>, P: Parse,

Peeks to see if a token is present. If it is, then it consumes the token and returns true.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'a> ParseBufferExt for ParseBuffer<'a>

Source§

fn peek_and_consume<T, P>(&self, token: T) -> bool
where T: Peek<Token = P>, P: Parse,

Implementors§