Struct syntax::tokenstream::TokenStream[][src]

pub struct TokenStream { /* fields omitted */ }

Token Streams

A TokenStream is an abstract sequence of tokens, organized into TokenTrees. The goal is for procedural macros to work with TokenStreams and TokenTrees instead of a representation of the abstract syntax tree. Today's TokenTrees can still contain AST via Token::Interpolated for back-compat.

Methods

impl TokenStream
[src]

Important traits for Cursor

Important traits for Cursor

Compares two TokenStreams, checking equality without regarding span information.

Precondition: self consists of a single token tree. Returns true if the token tree is a joint operation w.r.t. proc_macro::TokenNode.

Trait Implementations

impl Clone for TokenStream
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. 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 From<Token> for TokenStream
[src]

Performs the conversion.

impl<T: Into<TokenStream>> FromIterator<T> for TokenStream
[src]

Creates a value from an iterator. Read more

impl Eq for TokenStream
[src]

impl PartialEq<TokenStream> for TokenStream
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl From<TokenStream> for ThinTokenStream
[src]

Performs the conversion.

impl From<ThinTokenStream> for TokenStream
[src]

Performs the conversion.

impl Display for TokenStream
[src]

Formats the value using the given formatter. Read more

impl Encodable for TokenStream
[src]

impl Decodable for TokenStream
[src]

Auto Trait Implementations

impl !Send for TokenStream

impl !Sync for TokenStream