Struct unrest_tmp_quote::Tokens [] [src]

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.

Add tokens into self.

Add the symbol 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 Clone for Tokens
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Default for Tokens
[src]

Returns the "default value" for a type. Read more

impl ToTokens for Tokens
[src]

Write self to the given Tokens. Read more

Convert self directly into a Tokens object. Read more

impl Display for Tokens
[src]

Formats the value using the given formatter. Read more