pub trait TokenStream:
ProcMacro
+ Default
+ Display
+ Extend<Self::TokenStream>
+ Extend<Self::TokenTree>
+ From<Self::TokenTree>
+ FromIterator<Self::TokenStream>
+ FromIterator<Self::TokenTree>
+ FromStr
+ IntoIterator<IntoIter = Self::TokenStreamIntoIter, Item = Self::TokenTree> {
// Required methods
fn new() -> Self;
fn is_empty(&self) -> bool;
}Expand description
TokenStream API trait. See proc_macro::TokenStream.
This trait is implemented for TokenStream in proc_macro and proc_macro2 if the
corresponding feature is enabled.
See also TokenStreamExt.
Required Methods§
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 TokenStream for TokenStream
Available on crate feature proc-macro only.
impl TokenStream for TokenStream
Available on crate feature
proc-macro only.Source§impl TokenStream for TokenStream
Available on crate feature proc-macro2 only.
impl TokenStream for TokenStream
Available on crate feature
proc-macro2 only.