[][src]Struct syntex_syntax2::tokenstream::TokenStream

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]

pub fn empty() -> TokenStream[src]

pub fn is_empty(&self) -> bool[src]

pub fn concat(streams: Vec<TokenStream>) -> TokenStream[src]

Important traits for Cursor
pub fn trees(&self) -> Cursor[src]

Important traits for Cursor
pub fn into_trees(self) -> Cursor[src]

pub fn eq_unspanned(&self, other: &TokenStream) -> bool[src]

Compares two TokenStreams, checking equality without regarding span information.

Trait Implementations

impl PartialEq<TokenStream> for TokenStream[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl Eq for TokenStream[src]

impl From<TokenTree> for TokenStream[src]

impl From<Token> for TokenStream[src]

impl From<TokenStream> for ThinTokenStream[src]

impl From<ThinTokenStream> for TokenStream[src]

impl Clone for TokenStream[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Hash for TokenStream[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for TokenStream[src]

impl Display for TokenStream[src]

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

impl<'de> Deserialize<'de> for TokenStream[src]

impl Serialize for TokenStream[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]