pub trait Delimited: Sealed {
// Required methods
fn is_parenthesized(&self) -> bool;
fn is_braced(&self) -> bool;
fn is_bracketed(&self) -> bool;
fn is_implicitly_delimited(&self) -> bool;
}Expand description
Trait to test for delimiters of groups
Required Methods§
Sourcefn is_parenthesized(&self) -> bool
fn is_parenthesized(&self) -> bool
Tests if the token is a group with parentheses (( ... ))
Sourcefn is_bracketed(&self) -> bool
fn is_bracketed(&self) -> bool
Tests if the token is a group with brackets ([ ... ])
Sourcefn is_implicitly_delimited(&self) -> bool
fn is_implicitly_delimited(&self) -> bool
Tests if the token is a group with no delimiters (Ø ... Ø)
Implementations on Foreign Types§
Source§impl Delimited for TokenTree
Available on crate feature proc-macro only.
impl Delimited for TokenTree
proc-macro only.Source§fn is_parenthesized(&self) -> bool
fn is_parenthesized(&self) -> bool
Tests if the token is a group with parentheses (( ... ))
Source§fn is_bracketed(&self) -> bool
fn is_bracketed(&self) -> bool
Tests if the token is a group with brackets ([ ... ])
Source§fn is_implicitly_delimited(&self) -> bool
fn is_implicitly_delimited(&self) -> bool
Tests if the token is a group with no delimiters (Ø ... Ø)
Source§impl Delimited for TokenTree
Available on crate feature proc-macro2 only.
impl Delimited for TokenTree
proc-macro2 only.Source§fn is_parenthesized(&self) -> bool
fn is_parenthesized(&self) -> bool
Tests if the token is a group with parentheses (( ... ))
Source§fn is_bracketed(&self) -> bool
fn is_bracketed(&self) -> bool
Tests if the token is a group with brackets ([ ... ])
Source§fn is_implicitly_delimited(&self) -> bool
fn is_implicitly_delimited(&self) -> bool
Tests if the token is a group with no delimiters (Ø ... Ø)
Source§impl Delimited for Group
Available on crate feature proc-macro only.
impl Delimited for Group
proc-macro only.Source§fn is_parenthesized(&self) -> bool
fn is_parenthesized(&self) -> bool
Tests if a group has parentheses (( ... ))
Source§fn is_bracketed(&self) -> bool
fn is_bracketed(&self) -> bool
Tests if a group has brackets ([ ... ])
Source§fn is_implicitly_delimited(&self) -> bool
fn is_implicitly_delimited(&self) -> bool
Tests if a group has no delimiters (Ø ... Ø)
Source§impl Delimited for Group
Available on crate feature proc-macro2 only.
impl Delimited for Group
proc-macro2 only.Source§fn is_parenthesized(&self) -> bool
fn is_parenthesized(&self) -> bool
Tests if a group has parentheses (( ... ))
Source§fn is_bracketed(&self) -> bool
fn is_bracketed(&self) -> bool
Tests if a group has brackets ([ ... ])
Source§fn is_implicitly_delimited(&self) -> bool
fn is_implicitly_delimited(&self) -> bool
Tests if a group has no delimiters (Ø ... Ø)