pub trait ToTokens {
    // Required method
    fn to_tokens(&self, tokens: &mut TokenStream);

    // Provided methods
    fn to_token_stream(&self) -> TokenStream { ... }
    fn into_token_stream(self) -> TokenStream
       where Self: Sized { ... }
}
Expand description

Types that can be interpolated inside a quote! invocation.

Required Methods§

source

fn to_tokens(&self, tokens: &mut TokenStream)

Write self to the given TokenStream.

The token append methods provided by the TokenStreamExt extension trait may be useful for implementing ToTokens.

Example

Example implementation for a struct representing Rust paths like std::cmp::PartialEq:

use proc_macro2::{TokenTree, Spacing, Span, Punct, TokenStream};
use quote::{TokenStreamExt, ToTokens};

pub struct Path {
    pub global: bool,
    pub segments: Vec<PathSegment>,
}

impl ToTokens for Path {
    fn to_tokens(&self, tokens: &mut TokenStream) {
        for (i, segment) in self.segments.iter().enumerate() {
            if i > 0 || self.global {
                // Double colon `::`
                tokens.append(Punct::new(':', Spacing::Joint));
                tokens.append(Punct::new(':', Spacing::Alone));
            }
            segment.to_tokens(tokens);
        }
    }
}

Provided Methods§

source

fn to_token_stream(&self) -> TokenStream

Convert self directly into a TokenStream object.

This method is implicitly implemented using to_tokens, and acts as a convenience method for consumers of the ToTokens trait.

source

fn into_token_stream(self) -> TokenStreamwhere Self: Sized,

Convert self directly into a TokenStream object.

This method is implicitly implemented using to_tokens, and acts as a convenience method for consumers of the ToTokens trait.

Implementations on Foreign Types§

source§

impl ToTokens for bool

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for isize

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for String

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for i8

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for TokenStream

source§

impl ToTokens for Group

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl<T> ToTokens for Option<T>where T: ToTokens,

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for f32

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for char

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for u128

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for str

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for TokenTree

source§

fn to_tokens(&self, dst: &mut TokenStream)

source§

impl<'a, T> ToTokens for Cow<'a, T>where T: ToOwned + ToTokens + ?Sized,

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Punct

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for usize

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for u16

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for u64

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Ident

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for i32

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl<T> ToTokens for Rc<T>where T: ToTokens + ?Sized,

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl<T> ToTokens for Box<T, Global>where T: ToTokens + ?Sized,

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl<'a, T> ToTokens for &'a Twhere T: ToTokens + ?Sized,

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for i128

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for f64

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for u8

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl<'a, T> ToTokens for &'a mut Twhere T: ToTokens + ?Sized,

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for u32

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for i64

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for i16

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Literal

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprIndex

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Auto

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for PatReference

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for GenericParam

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for LitFloat

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprWhile

Available on crate feature full only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Gt

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprAssign

Available on crate feature full only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Not

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Question

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ForeignItemType

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for TypePtr

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Box

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Const

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Shr

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprIf

Available on crate feature full only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprGroup

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for PatRest

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprUnsafe

Available on crate feature full only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Ref

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Unsafe

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for SelfValue

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for TypeBareFn

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprCall

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for TypeArray

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for PredicateLifetime

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for TraitItem

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Meta

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for File

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Eq

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Async

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Variadic

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for And

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprMatch

Available on crate feature full only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for TypeGroup

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Move

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for UseGlob

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for FatArrow

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ImplItemMacro

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ItemEnum

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Union

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for BoundLifetimes

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for PatTuple

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprArray

Available on crate feature full only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Typeof

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Ne

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Final

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ShrEq

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for TraitItemFn

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for CaretEq

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for TypeParen

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Fields

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for LArrow

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ForeignItemFn

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Impl

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ReturnType

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for RangeLimits

Available on crate feature full only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for PatStruct

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for TypeNever

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Static

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl<T, P> ToTokens for Pair<T, P>where T: ToTokens, P: ToTokens,

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprContinue

Available on crate feature full only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Type

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprField

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Yield

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Signature

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ItemStruct

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for GenericArgument

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Unsized

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Attribute

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ParenthesizedGenericArguments

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ForeignItemMacro

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Lit

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for TraitBoundModifier

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for AssocConst

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl<'a> ToTokens for Turbofish<'a>

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for LitByteStr

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ItemTraitAlias

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Use

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for VisRestricted

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Slash

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for TypeMacro

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Struct

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for UseName

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprBreak

Available on crate feature full only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Fn

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Abstract

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for FieldPat

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Lt

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Super

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ItemTrait

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Loop

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Default

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for TraitItemConst

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for PathArguments

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Do

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for SlashEq

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ShlEq

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Virtual

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Mod

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for BareVariadic

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for FieldValue

Available on crate feature full only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprAsync

Available on crate feature full only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ItemMod

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Let

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for DotDotDot

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Le

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for AssocType

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for PathSegment

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for LitChar

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for PathSep

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for DotDot

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for MinusEq

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Dyn

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprLit

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for LitStr

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for FieldsNamed

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for TypeTuple

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for As

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for DotDotEq

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Expr

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprForLoop

Available on crate feature full only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprTry

Available on crate feature full only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for TypeSlice

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprLet

Available on crate feature full only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for UnOp

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for LitByte

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for TypeImplTrait

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ImplItemType

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprTryBlock

Available on crate feature full only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for AngleBracketedGenericArguments

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for BinOp

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for TraitItemMacro

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl<'a> ToTokens for ImplGenerics<'a>

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Become

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprTuple

Available on crate feature full only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprCast

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Extern

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for LitBool

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Mut

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ImplItemFn

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Else

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for TraitItemType

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Where

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for FnArg

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for MetaList

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for PatOr

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for OrOr

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for PatParen

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ItemFn

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Plus

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Stmt

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Ge

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Return

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ForeignItem

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for OrEq

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Star

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Pub

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ItemExternCrate

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for WherePredicate

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for BareFnArg

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for While

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprLoop

Available on crate feature full only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ConstParam

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Await

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Pound

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Macro

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ItemConst

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for LitInt

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for TypeParam

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Lifetime

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Index

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprMethodCall

Available on crate feature full only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Minus

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprPath

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl<'a> ToTokens for TypeGenerics<'a>

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprUnary

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for TraitBound

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprYield

Available on crate feature full only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprStruct

Available on crate feature full only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for AndAnd

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Caret

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Match

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Percent

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Arm

Available on crate feature full only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprClosure

Available on crate feature full only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for TypeInfer

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Macro

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Generics

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Comma

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Break

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Priv

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ItemForeignMod

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprParen

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Or

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for UsePath

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for If

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Abi

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Override

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Path

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Local

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Shl

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprMacro

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Type

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for FieldsUnnamed

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for UseRename

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Enum

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Visibility

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for SelfType

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for StmtMacro

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Dot

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Constraint

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for PatWild

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for RArrow

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for PlusEq

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Variant

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ItemUse

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for LifetimeParam

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Block

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for TypePath

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for PredicateType

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprBlock

Available on crate feature full only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Colon

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Field

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for WhereClause

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for TypeReference

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for In

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for TypeTraitObject

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for PercentEq

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Label

Available on crate feature full only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ItemType

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for PatType

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Pat

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for For

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ItemUnion

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprRange

Available on crate feature full only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for AndEq

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Continue

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for MetaNameValue

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for DeriveInput

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Member

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ImplItem

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for PatTupleStruct

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for PatSlice

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for PatIdent

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Dollar

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl<T, P> ToTokens for Punctuated<T, P>where T: ToTokens, P: ToTokens,

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Item

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for TypeParamBound

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ItemImpl

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for StaticMutability

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ImplItemConst

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for StarEq

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprBinary

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Tilde

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ItemMacro

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Underscore

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Try

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Semi

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for EqEq

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprRepeat

Available on crate feature full only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprAwait

Available on crate feature full only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Trait

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Crate

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprInfer

Available on crate feature full only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprReturn

Available on crate feature full only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ForeignItemStatic

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for Receiver

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprConst

Available on crate feature full only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for At

Available on crate feature printing only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ExprReference

Available on crate feature full only.
source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for ItemStatic

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for UseGroup

source§

fn to_tokens(&self, tokens: &mut TokenStream)

source§

impl ToTokens for UseTree

source§

fn to_tokens(&self, tokens: &mut TokenStream)

Implementors§