pub trait TokenStream: Types {
    // Required methods
    fn is_empty(&mut self, self_: &Self::TokenStream) -> bool;
    fn expand_expr(
        &mut self,
        self_: &Self::TokenStream
    ) -> Result<Self::TokenStream, ()>;
    fn from_str(&mut self, src: &str) -> Self::TokenStream;
    fn to_string(&mut self, self_: &Self::TokenStream) -> String;
    fn from_token_tree(
        &mut self,
        tree: TokenTree<Self::TokenStream, Self::Span, Self::Symbol>
    ) -> Self::TokenStream;
    fn concat_trees(
        &mut self,
        base: Option<Self::TokenStream>,
        trees: Vec<TokenTree<Self::TokenStream, Self::Span, Self::Symbol>>
    ) -> Self::TokenStream;
    fn concat_streams(
        &mut self,
        base: Option<Self::TokenStream>,
        streams: Vec<Self::TokenStream>
    ) -> Self::TokenStream;
    fn into_trees(
        &mut self,
        self_: Self::TokenStream
    ) -> Vec<TokenTree<Self::TokenStream, Self::Span, Self::Symbol>>;

    // Provided methods
    fn drop(&mut self, self_: Self::TokenStream) { ... }
    fn clone(&mut self, self_: &Self::TokenStream) -> Self::TokenStream { ... }
}
🔬This is a nightly-only experimental API. (proc_macro_internals #27812)

Required Methods§

source

fn is_empty(&mut self, self_: &Self::TokenStream) -> bool

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source

fn expand_expr( &mut self, self_: &Self::TokenStream ) -> Result<Self::TokenStream, ()>

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source

fn from_str(&mut self, src: &str) -> Self::TokenStream

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source

fn to_string(&mut self, self_: &Self::TokenStream) -> String

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source

fn from_token_tree( &mut self, tree: TokenTree<Self::TokenStream, Self::Span, Self::Symbol> ) -> Self::TokenStream

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source

fn concat_trees( &mut self, base: Option<Self::TokenStream>, trees: Vec<TokenTree<Self::TokenStream, Self::Span, Self::Symbol>> ) -> Self::TokenStream

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source

fn concat_streams( &mut self, base: Option<Self::TokenStream>, streams: Vec<Self::TokenStream> ) -> Self::TokenStream

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source

fn into_trees( &mut self, self_: Self::TokenStream ) -> Vec<TokenTree<Self::TokenStream, Self::Span, Self::Symbol>>

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)

Provided Methods§

source

fn drop(&mut self, self_: Self::TokenStream)

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)
source

fn clone(&mut self, self_: &Self::TokenStream) -> Self::TokenStream

🔬This is a nightly-only experimental API. (proc_macro_internals #27812)

Implementors§