[][src]Struct quote::Tokens

pub struct Tokens { /* fields omitted */ }

Tokens produced by a quote! invocation.

Methods

impl Tokens
[src]

Empty tokens.

For use by ToTokens implementations.

Appends the token specified to this list of tokens.

For use by ToTokens implementations.

struct X;

impl ToTokens for X {
    fn to_tokens(&self, tokens: &mut Tokens) {
        tokens.append_all(&[true, false]);
    }
}

let tokens = quote!(#X);
assert_eq!(tokens.to_string(), "true false");

For use by ToTokens implementations.

Appends all of the items in the iterator I, separated by the tokens U.

For use by ToTokens implementations.

Appends all tokens in the iterator I, appending U after each element, including after the last element of the iterator.

Trait Implementations

impl ToTokens for Tokens
[src]

impl Clone for Tokens
[src]

Performs copy-assignment from source. Read more

impl From<Tokens> for TokenStream
[src]

impl From<Tokens> for TokenStream
[src]

impl Default for Tokens
[src]

impl PartialEq<Tokens> for Tokens
[src]

This method tests for !=.

impl IntoIterator for Tokens
[src]

Allows a Tokens to be passed to Tokens::append_all.

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

impl Display for Tokens
[src]

impl Debug for Tokens
[src]

impl<'a> Hash for Tokens
[src]

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

Auto Trait Implementations

impl !Send for Tokens

impl !Sync for Tokens

Blanket Implementations

impl<T> From for T
[src]

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

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

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

impl<I> IntoIterator for I where
    I: Iterator
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

impl<E> SpecializationError for E
[src]

impl<T> Erased for T
[src]

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

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

impl<T> Erased for T