pub trait Delimited {
    // 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§

source

fn is_parenthesized(&self) -> bool

Tests if the token is a group with parentheses (( ... ))

source

fn is_braced(&self) -> bool

Tests if the token is a group with braces ({ ... })

source

fn is_bracketed(&self) -> bool

Tests if the token is a group with brackets ([ ... ])

source

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-macro2 only.
source§

fn is_parenthesized(&self) -> bool

Tests if the token is a group with parentheses (( ... ))

source§

fn is_braced(&self) -> bool

Tests if the token is a group with braces ({ ... })

source§

fn is_bracketed(&self) -> bool

Tests if the token is a group with brackets ([ ... ])

source§

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.
source§

fn is_parenthesized(&self) -> bool

Tests if a group has parentheses (( ... ))

source§

fn is_braced(&self) -> bool

Tests if a group has braces ({ ... })

source§

fn is_bracketed(&self) -> bool

Tests if a group has brackets ([ ... ])

source§

fn is_implicitly_delimited(&self) -> bool

Tests if a group has no delimiters (Ø ... Ø)

source§

impl Delimited for TokenTree

Available on crate feature proc-macro only.
source§

fn is_parenthesized(&self) -> bool

Tests if the token is a group with parentheses (( ... ))

source§

fn is_braced(&self) -> bool

Tests if the token is a group with braces ({ ... })

source§

fn is_bracketed(&self) -> bool

Tests if the token is a group with brackets ([ ... ])

source§

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-macro2 only.
source§

fn is_parenthesized(&self) -> bool

Tests if a group has parentheses (( ... ))

source§

fn is_braced(&self) -> bool

Tests if a group has braces ({ ... })

source§

fn is_bracketed(&self) -> bool

Tests if a group has brackets ([ ... ])

source§

fn is_implicitly_delimited(&self) -> bool

Tests if a group has no delimiters (Ø ... Ø)

Implementors§