Skip to main content

ToTokens

Trait ToTokens 

Source
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) -> TokenStream
where 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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ToTokens for Abi

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 Add

Available on crate feature printing only.
Source§

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

Source§

impl ToTokens for AddEq

Available on crate feature printing only.
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 AndAnd

Available on crate feature printing 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 AngleBracketedGenericArguments

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 Async

Available on crate feature printing 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 Attribute

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 Await

Available on crate feature printing only.
Source§

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

Source§

impl ToTokens for Bang

Available on crate feature printing only.
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 Become

Available on crate feature printing only.
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 Binding

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 Box

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 CStr

Source§

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

Source§

impl ToTokens for CString

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 CaretEq

Available on crate feature printing 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 Colon2

Available on crate feature printing only.
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 Const

Available on crate feature printing 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 Constraint

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 Crate

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 DeriveInput

Source§

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

Source§

impl ToTokens for Div

Available on crate feature printing only.
Source§

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

Source§

impl ToTokens for DivEq

Available on crate feature printing only.
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 Dollar

Available on crate feature printing only.
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 Dot2

Available on crate feature printing only.
Source§

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

Source§

impl ToTokens for Dot3

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 Dyn

Available on crate feature printing only.
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 Enum

Available on crate feature printing only.
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 EqEq

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 ExprArray

Available on crate feature printing and non-crate feature full only.
Source§

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

Source§

impl ToTokens for ExprAssign

Available on crate feature printing and non-crate feature full only.
Source§

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

Source§

impl ToTokens for ExprAssignOp

Available on crate feature printing and non-crate feature full only.
Source§

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

Source§

impl ToTokens for ExprAsync

Available on crate feature printing and non-crate feature full only.
Source§

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

Source§

impl ToTokens for ExprAwait

Available on crate feature printing and non-crate feature full only.
Source§

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

Source§

impl ToTokens for ExprBinary

Source§

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

Source§

impl ToTokens for ExprBlock

Available on crate feature printing and non-crate feature full only.
Source§

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

Source§

impl ToTokens for ExprBox

Available on crate feature printing and non-crate feature full only.
Source§

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

Source§

impl ToTokens for ExprBreak

Available on crate feature printing and non-crate feature full only.
Source§

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

Source§

impl ToTokens for ExprCall

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 ExprClosure

Available on crate feature printing and non-crate feature full only.
Source§

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

Source§

impl ToTokens for ExprContinue

Available on crate feature printing and non-crate feature full only.
Source§

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

Source§

impl ToTokens for ExprField

Source§

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

Source§

impl ToTokens for ExprForLoop

Available on crate feature printing and non-crate feature full only.
Source§

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

Source§

impl ToTokens for ExprGroup

Available on crate feature printing and non-crate feature full only.
Source§

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

Source§

impl ToTokens for ExprIf

Available on crate feature printing and non-crate feature full only.
Source§

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

Source§

impl ToTokens for ExprIndex

Source§

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

Source§

impl ToTokens for ExprLet

Available on crate feature printing and non-crate feature full only.
Source§

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

Source§

impl ToTokens for ExprLit

Source§

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

Source§

impl ToTokens for ExprLoop

Available on crate feature printing and non-crate feature full only.
Source§

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

Source§

impl ToTokens for ExprMacro

Available on crate feature printing and non-crate feature full only.
Source§

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

Source§

impl ToTokens for ExprMatch

Available on crate feature printing and non-crate feature full only.
Source§

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

Source§

impl ToTokens for ExprMethodCall

Available on crate feature printing and non-crate feature full only.
Source§

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

Source§

impl ToTokens for ExprParen

Source§

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

Source§

impl ToTokens for ExprPath

Source§

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

Source§

impl ToTokens for ExprRange

Available on crate feature printing and non-crate feature full only.
Source§

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

Source§

impl ToTokens for ExprReference

Available on crate feature printing and non-crate feature full only.
Source§

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

Source§

impl ToTokens for ExprRepeat

Available on crate feature printing and non-crate feature full only.
Source§

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

Source§

impl ToTokens for ExprReturn

Available on crate feature printing and non-crate feature full only.
Source§

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

Source§

impl ToTokens for ExprStruct

Available on crate feature printing and non-crate feature full only.
Source§

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

Source§

impl ToTokens for ExprTry

Available on crate feature printing and non-crate feature full only.
Source§

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

Source§

impl ToTokens for ExprTryBlock

Available on crate feature printing and non-crate feature full only.
Source§

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

Source§

impl ToTokens for ExprTuple

Available on crate feature printing and non-crate feature full only.
Source§

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

Source§

impl ToTokens for ExprType

Available on crate feature printing and non-crate feature full only.
Source§

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

Source§

impl ToTokens for ExprUnary

Source§

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

Source§

impl ToTokens for ExprUnsafe

Available on crate feature printing and non-crate feature full only.
Source§

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

Source§

impl ToTokens for ExprWhile

Available on crate feature printing and non-crate feature full only.
Source§

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

Source§

impl ToTokens for ExprYield

Available on crate feature printing and non-crate feature full only.
Source§

fn to_tokens(&self, _: &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 FatArrow

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 Fields

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 FieldsUnnamed

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 Fn

Available on crate feature printing only.
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 Ge

Available on crate feature printing only.
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 GenericParam

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 Group

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 Ident

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 Impl

Available on crate feature printing only.
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 Index

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 Le

Available on crate feature printing only.
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 Lifetime

Source§

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

Source§

impl ToTokens for LifetimeDef

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 LitBool

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 LitByteStr

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 LitFloat

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 LitStr

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 Loop

Available on crate feature printing only.
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 Macro

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 Match

Available on crate feature printing only.
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 Meta

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 MetaNameValue

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 Move

Available on crate feature printing only.
Source§

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

Source§

impl ToTokens for MulEq

Available on crate feature printing only.
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 Ne

Available on crate feature printing only.
Source§

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

Source§

impl ToTokens for NestedMeta

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 OrEq

Available on crate feature printing only.
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 Override

Available on crate feature printing only.
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 Path

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 PathSegment

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 PredicateEq

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 PredicateType

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 Pub

Available on crate feature printing only.
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 Question

Available on crate feature printing only.
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 Ref

Available on crate feature printing only.
Source§

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

Source§

impl ToTokens for Rem

Available on crate feature printing only.
Source§

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

Source§

impl ToTokens for RemEq

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 ReturnType

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 SelfValue

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 Shl

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 Shr

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 Star

Available on crate feature printing only.
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 ToTokens for String

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 Sub

Available on crate feature printing only.
Source§

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

Source§

impl ToTokens for SubEq

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 Tilde

Available on crate feature printing only.
Source§

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

Source§

impl ToTokens for TokenStream

Source§

impl ToTokens for TokenTree

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 TraitBound

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 Try

Available on crate feature printing 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 Type

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 TypeBareFn

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 TypeImplTrait

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 TypeMacro

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 TypeParam

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 TypeParen

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 TypePtr

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 TypeSlice

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 TypeTuple

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 UnOp

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 Union

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 Unsized

Available on crate feature printing only.
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 Variadic

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 Virtual

Available on crate feature printing only.
Source§

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

Source§

impl ToTokens for VisCrate

Source§

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

Source§

impl ToTokens for VisPublic

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 Visibility

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 WhereClause

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 While

Available on crate feature printing only.
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 bool

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 f32

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 i8

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 i32

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 i128

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 str

Source§

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

Source§

impl ToTokens for u8

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 u32

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 u128

Source§

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

Source§

impl ToTokens for usize

Source§

fn to_tokens(&self, tokens: &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<'a> ToTokens for ImplGenerics<'a>

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<'a> ToTokens for TypeGenerics<'a>

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<T, P> ToTokens for Punctuated<T, P>
where T: ToTokens, P: ToTokens,

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

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<T> ToTokens for Rc<T>
where T: ToTokens + ?Sized,

Source§

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

Implementors§