Trait DelimiterExt

Source
pub trait DelimiterExt:
    ProcMacroExt<DelimiterExt = Self>
    + Delimiter
    + From<DelimiterKind>
    + Into<DelimiterKind>
    + PartialEq<DelimiterKind> {
    // Provided methods
    fn kind(&self) -> DelimiterKind { ... }
    fn is_parenthesis(&self) -> bool { ... }
    fn is_brace(&self) -> bool { ... }
    fn is_bracket(&self) -> bool { ... }
    fn is_none(&self) -> bool { ... }
}
Expand description

Extensions for Delimiter.

This trait is implemented for Delimiter in proc_macro and proc_macro2 if the corresponding feature is enabled.

Provided Methods§

Source

fn kind(&self) -> DelimiterKind

Get the kind of this Delimiter.

Source

fn is_parenthesis(&self) -> bool

Check if this delimiter is Delimiter::Parenthesis.

Source

fn is_brace(&self) -> bool

Check if this delimiter is Delimiter::Brace.

Source

fn is_bracket(&self) -> bool

Check if this delimiter is Delimiter::Bracket.

Source

fn is_none(&self) -> bool

Check if this delimiter is Delimiter::None.

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.

Implementations on Foreign Types§

Source§

impl DelimiterExt for Delimiter

Available on crate feature proc-macro only.
Source§

impl DelimiterExt for Delimiter

Available on crate feature proc-macro2 only.

Implementors§