pub trait OptTreeExt<'a> {
// Required methods
fn is_ident(&self) -> bool;
fn is_string(&self, _: &str) -> bool;
fn is_numeric(&self) -> bool;
fn is_punct(&self, _: char) -> bool;
}
Expand description
This is an extension trait for the following impl:
ⓘ
#[extension(pub trait OptTreeExt)]
impl< 'a > for Option < & 'a TokenTree >
Required Methods§
Sourcefn is_ident(&self) -> bool
fn is_ident(&self) -> bool
check if this is an ident, use .. && self.is_string(..) for a specific
Sourcefn is_numeric(&self) -> bool
fn is_numeric(&self) -> bool
check if it’s a numeric literal