Trait ParseBufferExt

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

Required Methods§

Source

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

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: Peek<Token = P>, P: Parse>(&self, token: T) -> bool

Implementors§