Struct rune::TokenStream[][src]

pub struct TokenStream { /* fields omitted */ }

A token stream.

Implementations

impl TokenStream[src]

pub fn new() -> Self[src]

Construct an empty token stream for testing.

pub fn from_to_tokens<T>(tokens: T) -> Self where
    T: ToTokens
[src]

Construct a token stream from tokens.

Panics

This will panic if called outside of a macro context.

pub fn push(&mut self, token: Token)[src]

Push the current token to the stream.

pub fn extend<I>(&mut self, tokens: I) where
    I: IntoIterator,
    Token: From<I::Item>, 
[src]

Extend the token stream with another iterator.

pub fn kinds(&self) -> Kinds<'_>[src]

Return something that once formatted will produce a stream of kinds.

Trait Implementations

impl Clone for TokenStream[src]

impl Debug for TokenStream[src]

impl Default for TokenStream[src]

impl Eq for TokenStream[src]

impl From<Vec<Token, Global>> for TokenStream[src]

impl<'a> IntoIterator for &'a TokenStream[src]

type Item = &'a Token

The type of the elements being iterated over.

type IntoIter = Iter<'a, Token>

Which kind of iterator are we turning this into?

impl IntoIterator for TokenStream[src]

type Item = Token

The type of the elements being iterated over.

type IntoIter = IntoIter<Token>

Which kind of iterator are we turning this into?

impl OptionSpanned for TokenStream[src]

impl PartialEq<TokenStream> for TokenStream[src]

impl PartialEq<Vec<Token, Global>> for TokenStream[src]

impl StructuralEq for TokenStream[src]

impl StructuralPartialEq for TokenStream[src]

impl ToTokens for TokenStream[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.