pub struct TokenOr<T, U> { /* private fields */ }
Expand description
A simple token alternative for use with FirstToken
Trait Implementations§
Source§impl<T: CheckParses, U: CheckParses> CheckParses for TokenOr<T, U>
impl<T: CheckParses, U: CheckParses> CheckParses for TokenOr<T, U>
Source§fn check_parses<'t, I: Iterator<Item = &'t Token> + Clone>(
input: &InputStream<'t, I>,
) -> Option<bool>
fn check_parses<'t, I: Iterator<Item = &'t Token> + Clone>( input: &InputStream<'t, I>, ) -> Option<bool>
Check if
Self
would parse given the tokens.Auto Trait Implementations§
impl<T, U> Freeze for TokenOr<T, U>
impl<T, U> RefUnwindSafe for TokenOr<T, U>where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for TokenOr<T, U>
impl<T, U> Sync for TokenOr<T, U>
impl<T, U> Unpin for TokenOr<T, U>
impl<T, U> UnwindSafe for TokenOr<T, U>where
T: UnwindSafe,
U: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Convert for T
impl<T> Convert for T
Source§fn convert<U>(self, context: &CompileContext) -> Expr<U>where
U: ConvertFrom<T>,
fn convert<U>(self, context: &CompileContext) -> Expr<U>where
U: ConvertFrom<T>,
Convert
self
into a specific type. Read moreSource§fn can_convert<U>(&self) -> boolwhere
U: ConvertFrom<T>,
fn can_convert<U>(&self) -> boolwhere
U: ConvertFrom<T>,
Check if
self
can be converted into a specific type. Read more