Trait synthez_core::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§
sourcefn to_tokens(&self, tokens: &mut TokenStream)
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§
sourcefn to_token_stream(&self) -> TokenStream
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.
sourcefn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
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 TokenStream
impl ToTokens for TokenStream
fn to_tokens(&self, dst: &mut TokenStream)
fn into_token_stream(self) -> TokenStream
source§impl<T> ToTokens for Option<T>where
T: ToTokens,
impl<T> ToTokens for Option<T>where T: ToTokens,
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl<'a, T> ToTokens for Cow<'a, T>where
T: ToOwned + ToTokens + ?Sized,
impl<'a, T> ToTokens for Cow<'a, T>where T: ToOwned + ToTokens + ?Sized,
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl<T> ToTokens for Rc<T>where
T: ToTokens + ?Sized,
impl<T> ToTokens for Rc<T>where T: ToTokens + ?Sized,
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl<T> ToTokens for Box<T, Global>where
T: ToTokens + ?Sized,
impl<T> ToTokens for Box<T, Global>where T: ToTokens + ?Sized,
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl<'a, T> ToTokens for &'a Twhere
T: ToTokens + ?Sized,
impl<'a, T> ToTokens for &'a Twhere T: ToTokens + ?Sized,
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl<'a, T> ToTokens for &'a mut Twhere
T: ToTokens + ?Sized,
impl<'a, T> ToTokens for &'a mut Twhere T: ToTokens + ?Sized,
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Auto
Available on crate feature printing
only.
impl ToTokens for Auto
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for PatReference
impl ToTokens for PatReference
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for GenericParam
impl ToTokens for GenericParam
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ExprWhile
Available on crate feature full
only.
impl ToTokens for ExprWhile
Available on crate feature
full
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Gt
Available on crate feature printing
only.
impl ToTokens for Gt
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ExprAssign
Available on crate feature full
only.
impl ToTokens for ExprAssign
Available on crate feature
full
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Not
Available on crate feature printing
only.
impl ToTokens for Not
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Question
Available on crate feature printing
only.
impl ToTokens for Question
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ForeignItemType
impl ToTokens for ForeignItemType
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Box
Available on crate feature printing
only.
impl ToTokens for Box
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Const
Available on crate feature printing
only.
impl ToTokens for Const
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Shr
Available on crate feature printing
only.
impl ToTokens for Shr
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ExprIf
Available on crate feature full
only.
impl ToTokens for ExprIf
Available on crate feature
full
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ExprUnsafe
Available on crate feature full
only.
impl ToTokens for ExprUnsafe
Available on crate feature
full
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Ref
Available on crate feature printing
only.
impl ToTokens for Ref
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Unsafe
Available on crate feature printing
only.
impl ToTokens for Unsafe
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for SelfValue
Available on crate feature printing
only.
impl ToTokens for SelfValue
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for TypeBareFn
impl ToTokens for TypeBareFn
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for PredicateLifetime
impl ToTokens for PredicateLifetime
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Eq
Available on crate feature printing
only.
impl ToTokens for Eq
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Async
Available on crate feature printing
only.
impl ToTokens for Async
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for And
Available on crate feature printing
only.
impl ToTokens for And
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ExprMatch
Available on crate feature full
only.
impl ToTokens for ExprMatch
Available on crate feature
full
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Move
Available on crate feature printing
only.
impl ToTokens for Move
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for FatArrow
Available on crate feature printing
only.
impl ToTokens for FatArrow
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ImplItemMacro
impl ToTokens for ImplItemMacro
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Union
Available on crate feature printing
only.
impl ToTokens for Union
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for BoundLifetimes
impl ToTokens for BoundLifetimes
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ExprArray
Available on crate feature full
only.
impl ToTokens for ExprArray
Available on crate feature
full
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Typeof
Available on crate feature printing
only.
impl ToTokens for Typeof
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Ne
Available on crate feature printing
only.
impl ToTokens for Ne
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Final
Available on crate feature printing
only.
impl ToTokens for Final
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ShrEq
Available on crate feature printing
only.
impl ToTokens for ShrEq
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for TraitItemFn
impl ToTokens for TraitItemFn
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for CaretEq
Available on crate feature printing
only.
impl ToTokens for CaretEq
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for LArrow
Available on crate feature printing
only.
impl ToTokens for LArrow
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ForeignItemFn
impl ToTokens for ForeignItemFn
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Impl
Available on crate feature printing
only.
impl ToTokens for Impl
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ReturnType
impl ToTokens for ReturnType
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for RangeLimits
Available on crate feature full
only.
impl ToTokens for RangeLimits
Available on crate feature
full
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Static
Available on crate feature printing
only.
impl ToTokens for Static
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl<T, P> ToTokens for Pair<T, P>where
T: ToTokens,
P: ToTokens,
impl<T, P> ToTokens for Pair<T, P>where T: ToTokens, P: ToTokens,
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ExprContinue
Available on crate feature full
only.
impl ToTokens for ExprContinue
Available on crate feature
full
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Type
Available on crate feature printing
only.
impl ToTokens for Type
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Yield
Available on crate feature printing
only.
impl ToTokens for Yield
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ItemStruct
impl ToTokens for ItemStruct
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for GenericArgument
impl ToTokens for GenericArgument
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Unsized
Available on crate feature printing
only.
impl ToTokens for Unsized
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ParenthesizedGenericArguments
impl ToTokens for ParenthesizedGenericArguments
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ForeignItemMacro
impl ToTokens for ForeignItemMacro
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for TraitBoundModifier
impl ToTokens for TraitBoundModifier
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for AssocConst
impl ToTokens for AssocConst
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for LitByteStr
impl ToTokens for LitByteStr
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ItemTraitAlias
impl ToTokens for ItemTraitAlias
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Use
Available on crate feature printing
only.
impl ToTokens for Use
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for VisRestricted
impl ToTokens for VisRestricted
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Slash
Available on crate feature printing
only.
impl ToTokens for Slash
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Struct
Available on crate feature printing
only.
impl ToTokens for Struct
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ExprBreak
Available on crate feature full
only.
impl ToTokens for ExprBreak
Available on crate feature
full
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Fn
Available on crate feature printing
only.
impl ToTokens for Fn
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Abstract
Available on crate feature printing
only.
impl ToTokens for Abstract
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Lt
Available on crate feature printing
only.
impl ToTokens for Lt
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Super
Available on crate feature printing
only.
impl ToTokens for Super
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Loop
Available on crate feature printing
only.
impl ToTokens for Loop
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Default
Available on crate feature printing
only.
impl ToTokens for Default
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for TraitItemConst
impl ToTokens for TraitItemConst
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for PathArguments
impl ToTokens for PathArguments
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Do
Available on crate feature printing
only.
impl ToTokens for Do
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for SlashEq
Available on crate feature printing
only.
impl ToTokens for SlashEq
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ShlEq
Available on crate feature printing
only.
impl ToTokens for ShlEq
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Virtual
Available on crate feature printing
only.
impl ToTokens for Virtual
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Mod
Available on crate feature printing
only.
impl ToTokens for Mod
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for BareVariadic
impl ToTokens for BareVariadic
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for FieldValue
Available on crate feature full
only.
impl ToTokens for FieldValue
Available on crate feature
full
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ExprAsync
Available on crate feature full
only.
impl ToTokens for ExprAsync
Available on crate feature
full
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Let
Available on crate feature printing
only.
impl ToTokens for Let
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for DotDotDot
Available on crate feature printing
only.
impl ToTokens for DotDotDot
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Le
Available on crate feature printing
only.
impl ToTokens for Le
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for PathSegment
impl ToTokens for PathSegment
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for PathSep
Available on crate feature printing
only.
impl ToTokens for PathSep
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for DotDot
Available on crate feature printing
only.
impl ToTokens for DotDot
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for MinusEq
Available on crate feature printing
only.
impl ToTokens for MinusEq
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Dyn
Available on crate feature printing
only.
impl ToTokens for Dyn
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for FieldsNamed
impl ToTokens for FieldsNamed
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for As
Available on crate feature printing
only.
impl ToTokens for As
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for DotDotEq
Available on crate feature printing
only.
impl ToTokens for DotDotEq
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ExprForLoop
Available on crate feature full
only.
impl ToTokens for ExprForLoop
Available on crate feature
full
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ExprTry
Available on crate feature full
only.
impl ToTokens for ExprTry
Available on crate feature
full
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ExprLet
Available on crate feature full
only.
impl ToTokens for ExprLet
Available on crate feature
full
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for TypeImplTrait
impl ToTokens for TypeImplTrait
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ImplItemType
impl ToTokens for ImplItemType
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ExprTryBlock
Available on crate feature full
only.
impl ToTokens for ExprTryBlock
Available on crate feature
full
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for AngleBracketedGenericArguments
impl ToTokens for AngleBracketedGenericArguments
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for TraitItemMacro
impl ToTokens for TraitItemMacro
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl<'a> ToTokens for ImplGenerics<'a>
impl<'a> ToTokens for ImplGenerics<'a>
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Become
Available on crate feature printing
only.
impl ToTokens for Become
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ExprTuple
Available on crate feature full
only.
impl ToTokens for ExprTuple
Available on crate feature
full
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Extern
Available on crate feature printing
only.
impl ToTokens for Extern
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Mut
Available on crate feature printing
only.
impl ToTokens for Mut
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ImplItemFn
impl ToTokens for ImplItemFn
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Else
Available on crate feature printing
only.
impl ToTokens for Else
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for TraitItemType
impl ToTokens for TraitItemType
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Where
Available on crate feature printing
only.
impl ToTokens for Where
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for OrOr
Available on crate feature printing
only.
impl ToTokens for OrOr
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Plus
Available on crate feature printing
only.
impl ToTokens for Plus
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Ge
Available on crate feature printing
only.
impl ToTokens for Ge
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Return
Available on crate feature printing
only.
impl ToTokens for Return
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ForeignItem
impl ToTokens for ForeignItem
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for OrEq
Available on crate feature printing
only.
impl ToTokens for OrEq
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Star
Available on crate feature printing
only.
impl ToTokens for Star
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Pub
Available on crate feature printing
only.
impl ToTokens for Pub
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ItemExternCrate
impl ToTokens for ItemExternCrate
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for WherePredicate
impl ToTokens for WherePredicate
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for While
Available on crate feature printing
only.
impl ToTokens for While
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ExprLoop
Available on crate feature full
only.
impl ToTokens for ExprLoop
Available on crate feature
full
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ConstParam
impl ToTokens for ConstParam
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Await
Available on crate feature printing
only.
impl ToTokens for Await
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Pound
Available on crate feature printing
only.
impl ToTokens for Pound
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ExprMethodCall
Available on crate feature full
only.
impl ToTokens for ExprMethodCall
Available on crate feature
full
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Minus
Available on crate feature printing
only.
impl ToTokens for Minus
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl<'a> ToTokens for TypeGenerics<'a>
impl<'a> ToTokens for TypeGenerics<'a>
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for TraitBound
impl ToTokens for TraitBound
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ExprYield
Available on crate feature full
only.
impl ToTokens for ExprYield
Available on crate feature
full
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ExprStruct
Available on crate feature full
only.
impl ToTokens for ExprStruct
Available on crate feature
full
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for AndAnd
Available on crate feature printing
only.
impl ToTokens for AndAnd
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Caret
Available on crate feature printing
only.
impl ToTokens for Caret
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Match
Available on crate feature printing
only.
impl ToTokens for Match
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Percent
Available on crate feature printing
only.
impl ToTokens for Percent
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Arm
Available on crate feature full
only.
impl ToTokens for Arm
Available on crate feature
full
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ExprClosure
Available on crate feature full
only.
impl ToTokens for ExprClosure
Available on crate feature
full
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Macro
Available on crate feature printing
only.
impl ToTokens for Macro
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Comma
Available on crate feature printing
only.
impl ToTokens for Comma
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Break
Available on crate feature printing
only.
impl ToTokens for Break
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Priv
Available on crate feature printing
only.
impl ToTokens for Priv
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ItemForeignMod
impl ToTokens for ItemForeignMod
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Or
Available on crate feature printing
only.
impl ToTokens for Or
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for If
Available on crate feature printing
only.
impl ToTokens for If
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Override
Available on crate feature printing
only.
impl ToTokens for Override
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Shl
Available on crate feature printing
only.
impl ToTokens for Shl
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for FieldsUnnamed
impl ToTokens for FieldsUnnamed
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Enum
Available on crate feature printing
only.
impl ToTokens for Enum
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Visibility
impl ToTokens for Visibility
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for SelfType
Available on crate feature printing
only.
impl ToTokens for SelfType
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Dot
Available on crate feature printing
only.
impl ToTokens for Dot
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Constraint
impl ToTokens for Constraint
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for RArrow
Available on crate feature printing
only.
impl ToTokens for RArrow
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for PlusEq
Available on crate feature printing
only.
impl ToTokens for PlusEq
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for LifetimeParam
impl ToTokens for LifetimeParam
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for PredicateType
impl ToTokens for PredicateType
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ExprBlock
Available on crate feature full
only.
impl ToTokens for ExprBlock
Available on crate feature
full
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Colon
Available on crate feature printing
only.
impl ToTokens for Colon
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for WhereClause
impl ToTokens for WhereClause
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for TypeReference
impl ToTokens for TypeReference
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for In
Available on crate feature printing
only.
impl ToTokens for In
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for TypeTraitObject
impl ToTokens for TypeTraitObject
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for PercentEq
Available on crate feature printing
only.
impl ToTokens for PercentEq
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Label
Available on crate feature full
only.
impl ToTokens for Label
Available on crate feature
full
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for For
Available on crate feature printing
only.
impl ToTokens for For
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ExprRange
Available on crate feature full
only.
impl ToTokens for ExprRange
Available on crate feature
full
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for AndEq
Available on crate feature printing
only.
impl ToTokens for AndEq
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Continue
Available on crate feature printing
only.
impl ToTokens for Continue
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for MetaNameValue
impl ToTokens for MetaNameValue
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for DeriveInput
impl ToTokens for DeriveInput
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for PatTupleStruct
impl ToTokens for PatTupleStruct
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Dollar
Available on crate feature printing
only.
impl ToTokens for Dollar
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl<T, P> ToTokens for Punctuated<T, P>where
T: ToTokens,
P: ToTokens,
impl<T, P> ToTokens for Punctuated<T, P>where T: ToTokens, P: ToTokens,
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for TypeParamBound
impl ToTokens for TypeParamBound
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for StaticMutability
impl ToTokens for StaticMutability
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ImplItemConst
impl ToTokens for ImplItemConst
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for StarEq
Available on crate feature printing
only.
impl ToTokens for StarEq
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ExprBinary
impl ToTokens for ExprBinary
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Tilde
Available on crate feature printing
only.
impl ToTokens for Tilde
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Underscore
Available on crate feature printing
only.
impl ToTokens for Underscore
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Try
Available on crate feature printing
only.
impl ToTokens for Try
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Semi
Available on crate feature printing
only.
impl ToTokens for Semi
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for EqEq
Available on crate feature printing
only.
impl ToTokens for EqEq
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ExprRepeat
Available on crate feature full
only.
impl ToTokens for ExprRepeat
Available on crate feature
full
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ExprAwait
Available on crate feature full
only.
impl ToTokens for ExprAwait
Available on crate feature
full
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Trait
Available on crate feature printing
only.
impl ToTokens for Trait
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for Crate
Available on crate feature printing
only.
impl ToTokens for Crate
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ExprInfer
Available on crate feature full
only.
impl ToTokens for ExprInfer
Available on crate feature
full
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ExprReturn
Available on crate feature full
only.
impl ToTokens for ExprReturn
Available on crate feature
full
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ForeignItemStatic
impl ToTokens for ForeignItemStatic
fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ExprConst
Available on crate feature full
only.
impl ToTokens for ExprConst
Available on crate feature
full
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for At
Available on crate feature printing
only.
impl ToTokens for At
Available on crate feature
printing
only.fn to_tokens(&self, tokens: &mut TokenStream)
source§impl ToTokens for ExprReference
Available on crate feature full
only.
impl ToTokens for ExprReference
Available on crate feature
full
only.