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§
Sourcefn kind(&self) -> DelimiterKind
fn kind(&self) -> DelimiterKind
Get the kind of this Delimiter.
Sourcefn is_parenthesis(&self) -> bool
fn is_parenthesis(&self) -> bool
Check if this delimiter is Delimiter::Parenthesis.
Sourcefn is_bracket(&self) -> bool
fn is_bracket(&self) -> bool
Check if this delimiter is Delimiter::Bracket.
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§
impl DelimiterExt for Delimiter
Available on crate feature
proc-macro only.impl DelimiterExt for Delimiter
Available on crate feature
proc-macro2 only.