[−][src]Struct wast_parser::parser::Lookahead1
A helpful structure to perform a lookahead of one token to determine what to parse.
For more information see the Parser::lookahead1 method.
Methods
impl<'_> Lookahead1<'_>[src]
pub fn peek<T: Peek>(&mut self) -> bool[src]
Attempts to see if T is the next token in the Parser this
Lookahead1 references.
For more information see Parser::lookahead1 and Parser::peek
pub fn error(self) -> Error[src]
Generates an error message saying that one of the tokens passed to
Lookahead1::peek method was expected.
Before calling this method you should call Lookahead1::peek for all
possible tokens you'd like to parse.
Auto Trait Implementations
impl<'a> !Send for Lookahead1<'a>
impl<'a> !Sync for Lookahead1<'a>
impl<'a> Unpin for Lookahead1<'a>
impl<'a> !UnwindSafe for Lookahead1<'a>
impl<'a> !RefUnwindSafe for Lookahead1<'a>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> From<T> for T[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,