pub trait TokenTreePunct {
Show 25 methods // Required methods fn is_equals(&self) -> bool; fn is_less_than(&self) -> bool; fn is_greater_than(&self) -> bool; fn is_exclamation(&self) -> bool; fn is_tilde(&self) -> bool; fn is_plus(&self) -> bool; fn is_minus(&self) -> bool; fn is_asterix(&self) -> bool; fn is_slash(&self) -> bool; fn is_percent(&self) -> bool; fn is_caret(&self) -> bool; fn is_and(&self) -> bool; fn is_pipe(&self) -> bool; fn is_at(&self) -> bool; fn is_dot(&self) -> bool; fn is_comma(&self) -> bool; fn is_semi(&self) -> bool; fn is_colon(&self) -> bool; fn is_pound(&self) -> bool; fn is_dollar(&self) -> bool; fn is_question(&self) -> bool; fn is_quote(&self) -> bool; fn is_alone(&self) -> bool; fn is_joint(&self) -> bool; fn alone(self) -> Self;
}
Expand description

Trait to test for punctuation

Required Methods§

source

fn is_equals(&self) -> bool

Tests if the token is =

source

fn is_less_than(&self) -> bool

Tests if the token is <

source

fn is_greater_than(&self) -> bool

Tests if the token is >

source

fn is_exclamation(&self) -> bool

Tests if the token is !

source

fn is_tilde(&self) -> bool

Tests if the token is ~

source

fn is_plus(&self) -> bool

Tests if the token is +

source

fn is_minus(&self) -> bool

Tests if the token is -

source

fn is_asterix(&self) -> bool

Tests if the token is *

source

fn is_slash(&self) -> bool

Tests if the token is /

source

fn is_percent(&self) -> bool

Tests if the token is %

source

fn is_caret(&self) -> bool

Tests if the token is ^

source

fn is_and(&self) -> bool

Tests if the token is &

source

fn is_pipe(&self) -> bool

Tests if the token is |

source

fn is_at(&self) -> bool

Tests if the token is @

source

fn is_dot(&self) -> bool

Tests if the token is .

source

fn is_comma(&self) -> bool

Tests if the token is ,

source

fn is_semi(&self) -> bool

Tests if the token is ;

source

fn is_colon(&self) -> bool

Tests if the token is :

source

fn is_pound(&self) -> bool

Tests if the token is #

source

fn is_dollar(&self) -> bool

Tests if the token is $

source

fn is_question(&self) -> bool

Tests if the token is ?

source

fn is_quote(&self) -> bool

Tests if the token is '

source

fn is_alone(&self) -> bool

Tests if token is followed by some none punctuation token or whitespace.

source

fn is_joint(&self) -> bool

Tests if token is followed by another punct and can potentially be combined into a multi-character operator.

source

fn alone(self) -> Self

If sets the spacing of a punct to Alone.

Implementations on Foreign Types§

source§

impl TokenTreePunct for TokenTree

Available on crate feature proc-macro only.
source§

fn is_equals(&self) -> bool

Tests if the token is =

source§

fn is_less_than(&self) -> bool

Tests if the token is <

source§

fn is_greater_than(&self) -> bool

Tests if the token is >

source§

fn is_exclamation(&self) -> bool

Tests if the token is !

source§

fn is_tilde(&self) -> bool

Tests if the token is ~

source§

fn is_plus(&self) -> bool

Tests if the token is +

source§

fn is_minus(&self) -> bool

Tests if the token is -

source§

fn is_asterix(&self) -> bool

Tests if the token is *

source§

fn is_slash(&self) -> bool

Tests if the token is /

source§

fn is_percent(&self) -> bool

Tests if the token is %

source§

fn is_caret(&self) -> bool

Tests if the token is ^

source§

fn is_and(&self) -> bool

Tests if the token is &

source§

fn is_pipe(&self) -> bool

Tests if the token is |

source§

fn is_at(&self) -> bool

Tests if the token is @

source§

fn is_dot(&self) -> bool

Tests if the token is .

source§

fn is_comma(&self) -> bool

Tests if the token is ,

source§

fn is_semi(&self) -> bool

Tests if the token is ;

source§

fn is_colon(&self) -> bool

Tests if the token is :

source§

fn is_pound(&self) -> bool

Tests if the token is #

source§

fn is_dollar(&self) -> bool

Tests if the token is $

source§

fn is_question(&self) -> bool

Tests if the token is ?

source§

fn is_quote(&self) -> bool

Tests if the token is '

source§

fn is_alone(&self) -> bool

Tests if token is followed by some none punctuation token or whitespace.

source§

fn is_joint(&self) -> bool

Tests if token is followed by another punct and can potentially be combined into a multi-character operator.

source§

fn alone(self) -> Self

If sets the spacing of a punct to Alone.

source§

impl TokenTreePunct for Punct

Available on crate feature proc-macro2 only.
source§

fn is_equals(&self) -> bool

source§

fn is_less_than(&self) -> bool

source§

fn is_greater_than(&self) -> bool

source§

fn is_exclamation(&self) -> bool

source§

fn is_tilde(&self) -> bool

source§

fn is_plus(&self) -> bool

source§

fn is_minus(&self) -> bool

source§

fn is_asterix(&self) -> bool

source§

fn is_slash(&self) -> bool

source§

fn is_percent(&self) -> bool

source§

fn is_caret(&self) -> bool

source§

fn is_and(&self) -> bool

source§

fn is_pipe(&self) -> bool

source§

fn is_at(&self) -> bool

source§

fn is_dot(&self) -> bool

source§

fn is_comma(&self) -> bool

source§

fn is_semi(&self) -> bool

source§

fn is_colon(&self) -> bool

source§

fn is_pound(&self) -> bool

source§

fn is_dollar(&self) -> bool

source§

fn is_question(&self) -> bool

source§

fn is_quote(&self) -> bool

source§

fn is_alone(&self) -> bool

source§

fn is_joint(&self) -> bool

source§

fn alone(self) -> Self

source§

impl TokenTreePunct for TokenTree

Available on crate feature proc-macro2 only.
source§

fn is_equals(&self) -> bool

Tests if the token is =

source§

fn is_less_than(&self) -> bool

Tests if the token is <

source§

fn is_greater_than(&self) -> bool

Tests if the token is >

source§

fn is_exclamation(&self) -> bool

Tests if the token is !

source§

fn is_tilde(&self) -> bool

Tests if the token is ~

source§

fn is_plus(&self) -> bool

Tests if the token is +

source§

fn is_minus(&self) -> bool

Tests if the token is -

source§

fn is_asterix(&self) -> bool

Tests if the token is *

source§

fn is_slash(&self) -> bool

Tests if the token is /

source§

fn is_percent(&self) -> bool

Tests if the token is %

source§

fn is_caret(&self) -> bool

Tests if the token is ^

source§

fn is_and(&self) -> bool

Tests if the token is &

source§

fn is_pipe(&self) -> bool

Tests if the token is |

source§

fn is_at(&self) -> bool

Tests if the token is @

source§

fn is_dot(&self) -> bool

Tests if the token is .

source§

fn is_comma(&self) -> bool

Tests if the token is ,

source§

fn is_semi(&self) -> bool

Tests if the token is ;

source§

fn is_colon(&self) -> bool

Tests if the token is :

source§

fn is_pound(&self) -> bool

Tests if the token is #

source§

fn is_dollar(&self) -> bool

Tests if the token is $

source§

fn is_question(&self) -> bool

Tests if the token is ?

source§

fn is_quote(&self) -> bool

Tests if the token is '

source§

fn is_alone(&self) -> bool

Tests if token is followed by some none punctuation token or whitespace.

source§

fn is_joint(&self) -> bool

Tests if token is followed by another punct and can potentially be combined into a multi-character operator.

source§

fn alone(self) -> Self

If sets the spacing of a punct to Alone.

source§

impl TokenTreePunct for Punct

Available on crate feature proc-macro only.
source§

fn is_equals(&self) -> bool

source§

fn is_less_than(&self) -> bool

source§

fn is_greater_than(&self) -> bool

source§

fn is_exclamation(&self) -> bool

source§

fn is_tilde(&self) -> bool

source§

fn is_plus(&self) -> bool

source§

fn is_minus(&self) -> bool

source§

fn is_asterix(&self) -> bool

source§

fn is_slash(&self) -> bool

source§

fn is_percent(&self) -> bool

source§

fn is_caret(&self) -> bool

source§

fn is_and(&self) -> bool

source§

fn is_pipe(&self) -> bool

source§

fn is_at(&self) -> bool

source§

fn is_dot(&self) -> bool

source§

fn is_comma(&self) -> bool

source§

fn is_semi(&self) -> bool

source§

fn is_colon(&self) -> bool

source§

fn is_pound(&self) -> bool

source§

fn is_dollar(&self) -> bool

source§

fn is_question(&self) -> bool

source§

fn is_quote(&self) -> bool

source§

fn is_alone(&self) -> bool

source§

fn is_joint(&self) -> bool

source§

fn alone(self) -> Self

Implementors§