Struct proc_macro::TokenStream1.15.0[][src]

pub struct TokenStream(_);

The main type provided by this crate, representing an abstract stream of tokens.

This is both the input and output of #[proc_macro_derive] definitions. Currently it's required to be a list of valid Rust items, but this restriction may be lifted in the future.

The API of this type is intentionally bare-bones, but it'll be expanded over time!

Methods

impl TokenStream
[src]

🔬 This is a nightly-only experimental API. (proc_macro #38356)

Returns an empty TokenStream.

🔬 This is a nightly-only experimental API. (proc_macro #38356)

Checks if this TokenStream is empty.

Trait Implementations

impl IntoIterator for TokenStream
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Important traits for IntoIter

Creates an iterator from a value. Read more

impl Clone for TokenStream
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl !Send for TokenStream
[src]

impl !Sync for TokenStream
[src]

impl FromStr for TokenStream
[src]

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

impl Display for TokenStream
[src]

Formats the value using the given formatter. Read more

impl Debug for TokenStream
[src]

Formats the value using the given formatter. Read more

impl From<TokenTree> for TokenStream
[src]

Performs the conversion.

impl FromIterator<TokenTree> for TokenStream
[src]

Creates a value from an iterator. Read more

impl FromIterator<TokenStream> for TokenStream
[src]

Creates a value from an iterator. Read more