Trait proc_macro::bridge::server::TokenStream
source · 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§
sourcefn is_empty(&mut self, self_: &Self::TokenStream) -> bool
fn is_empty(&mut self, self_: &Self::TokenStream) -> bool
🔬This is a nightly-only experimental API. (
proc_macro_internals
#27812)sourcefn expand_expr(
&mut self,
self_: &Self::TokenStream
) -> Result<Self::TokenStream, ()>
fn expand_expr( &mut self, self_: &Self::TokenStream ) -> Result<Self::TokenStream, ()>
🔬This is a nightly-only experimental API. (
proc_macro_internals
#27812)sourcefn from_str(&mut self, src: &str) -> Self::TokenStream
fn from_str(&mut self, src: &str) -> Self::TokenStream
🔬This is a nightly-only experimental API. (
proc_macro_internals
#27812)sourcefn to_string(&mut self, self_: &Self::TokenStream) -> String
fn to_string(&mut self, self_: &Self::TokenStream) -> String
🔬This is a nightly-only experimental API. (
proc_macro_internals
#27812)sourcefn from_token_tree(
&mut self,
tree: TokenTree<Self::TokenStream, Self::Span, Self::Symbol>
) -> Self::TokenStream
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)sourcefn concat_trees(
&mut self,
base: Option<Self::TokenStream>,
trees: Vec<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
🔬This is a nightly-only experimental API. (
proc_macro_internals
#27812)sourcefn concat_streams(
&mut self,
base: Option<Self::TokenStream>,
streams: Vec<Self::TokenStream>
) -> Self::TokenStream
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)sourcefn into_trees(
&mut self,
self_: Self::TokenStream
) -> Vec<TokenTree<Self::TokenStream, Self::Span, Self::Symbol>>
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§
sourcefn drop(&mut self, self_: Self::TokenStream)
fn drop(&mut self, self_: Self::TokenStream)
🔬This is a nightly-only experimental API. (
proc_macro_internals
#27812)sourcefn clone(&mut self, self_: &Self::TokenStream) -> Self::TokenStream
fn clone(&mut self, self_: &Self::TokenStream) -> Self::TokenStream
🔬This is a nightly-only experimental API. (
proc_macro_internals
#27812)