DekiTokenTreeExt

Trait DekiTokenTreeExt 

Source
pub trait DekiTokenTreeExt {
Show 15 methods // Required methods fn is_any_punct(&self) -> bool; fn is_any_ident(&self) -> bool; fn is_any_group(&self) -> bool; fn is_any_literal(&self) -> bool; fn unwrap_punct(self) -> Punct; fn unwrap_ident(self) -> Ident; fn unwrap_group(self) -> Group; fn unwrap_literal(self) -> Literal; fn map_punct<O: Default, F: FnOnce(&Punct) -> O>(&self, _: F) -> O; fn map_ident<O: Default, F: FnOnce(&Ident) -> O>(&self, _: F) -> O; fn map_group<O: Default, F: FnOnce(&Group) -> O>(&self, _: F) -> O; fn map_literal<O: Default, F: FnOnce(&Literal) -> O>(&self, _: F) -> O; fn is_numeric(&self) -> bool; fn is_string(&self, _: &str) -> bool; fn is_punct(&self, _: char) -> bool;
}
Expand description

This is an extension trait for the following impl:

#[extension(pub trait DekiTokenTreeExt)]
impl for TokenTree

Required Methods§

Source

fn is_any_punct(&self) -> bool

Source

fn is_any_ident(&self) -> bool

Source

fn is_any_group(&self) -> bool

Source

fn is_any_literal(&self) -> bool

Source

fn unwrap_punct(self) -> Punct

Source

fn unwrap_ident(self) -> Ident

Source

fn unwrap_group(self) -> Group

Source

fn unwrap_literal(self) -> Literal

Source

fn map_punct<O: Default, F: FnOnce(&Punct) -> O>(&self, _: F) -> O

Source

fn map_ident<O: Default, F: FnOnce(&Ident) -> O>(&self, _: F) -> O

Source

fn map_group<O: Default, F: FnOnce(&Group) -> O>(&self, _: F) -> O

Source

fn map_literal<O: Default, F: FnOnce(&Literal) -> O>(&self, _: F) -> O

Source

fn is_numeric(&self) -> bool

Source

fn is_string(&self, _: &str) -> bool

Source

fn is_punct(&self, _: char) -> bool

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.

Implementors§