Trait syn_serde::Syn

source ·
pub trait Syn: Sized + Sealed {
    type Adapter: Serialize + for<'de> Deserialize<'de>;

    // Required methods
    fn to_adapter(&self) -> Self::Adapter;
    fn from_adapter(adapter: &Self::Adapter) -> Self;
}
Expand description

A trait for the data structures of Syn and proc-macro2.

Required Associated Types§

source

type Adapter: Serialize + for<'de> Deserialize<'de>

Required Methods§

source

fn to_adapter(&self) -> Self::Adapter

Converts a Syn type into an adapter.

Examples
use syn_serde::Syn;

let syn_file: syn::File = syn::parse_quote! {
    fn main() {
        println!("Hello, world!");
    }
};

let serializable_file = syn_file.to_adapter();
println!("{}", serde_json::to_string_pretty(&serializable_file).unwrap());
source

fn from_adapter(adapter: &Self::Adapter) -> Self

Converts an adapter into a Syn type.

Examples
use syn_serde::Syn;

// `struct Unit;`
let json = r#"{
  "struct": {
    "ident": "Unit",
    "fields": "unit"
  }
}"#;

let serializable_file: <syn::File as Syn>::Adapter = serde_json::from_str(json)?;
let syn_file = syn::File::from_adapter(&serializable_file);

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Syn for Delimiter

§

type Adapter = Delimiter

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for Spacing

§

type Adapter = Spacing

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for TokenTree

§

type Adapter = TokenTree

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for AttrStyle

§

type Adapter = AttrStyle

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for Meta

§

type Adapter = Meta

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for Fields

§

type Adapter = Fields

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for Expr

§

type Adapter = Expr

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for Member

§

type Adapter = Member

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for RangeLimits

§

type Adapter = RangeLimits

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for GenericParam

§

type Adapter = GenericParam

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for TraitBoundModifier

§

type Adapter = TraitBoundModifier

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for TypeParamBound

§

type Adapter = TypeParamBound

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for WherePredicate

§

type Adapter = WherePredicate

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for FnArg

§

type Adapter = FnArg

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ForeignItem

§

type Adapter = ForeignItem

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ImplItem

§

type Adapter = ImplItem

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ImplRestriction

§

type Adapter = ImplRestriction

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for Item

§

type Adapter = Item

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for StaticMutability

§

type Adapter = StaticMutability

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for TraitItem

§

type Adapter = TraitItem

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for UseTree

§

type Adapter = UseTree

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for Lit

§

type Adapter = Lit

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for MacroDelimiter

§

type Adapter = MacroDelimiter

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for BinOp

§

type Adapter = BinOp

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for UnOp

§

type Adapter = UnOp

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for Pat

§

type Adapter = Pat

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for GenericArgument

§

type Adapter = GenericArgument

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for PathArguments

§

type Adapter = PathArguments

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for FieldMutability

§

type Adapter = FieldMutability

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for Visibility

§

type Adapter = Visibility

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for Stmt

§

type Adapter = Stmt

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ReturnType

§

type Adapter = ReturnType

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for Type

§

type Adapter = Type

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for Group

§

type Adapter = Group

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for Ident

§

type Adapter = Ident

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for Literal

§

type Adapter = Literal

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for Punct

§

type Adapter = Punct

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for TokenStream

§

type Adapter = TokenStream

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for Attribute

§

type Adapter = Attribute

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for MetaList

§

type Adapter = MetaList

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for MetaNameValue

§

type Adapter = MetaNameValue

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for Field

§

type Adapter = Field

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for FieldsNamed

§

type Adapter = FieldsNamed

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for FieldsUnnamed

§

type Adapter = FieldsUnnamed

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for Variant

§

type Adapter = Variant

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for Arm

§

type Adapter = Arm

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprArray

§

type Adapter = ExprArray

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprAssign

§

type Adapter = ExprAssign

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprAsync

§

type Adapter = ExprAsync

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprAwait

§

type Adapter = ExprAwait

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprBinary

§

type Adapter = ExprBinary

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprBlock

§

type Adapter = ExprBlock

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprBreak

§

type Adapter = ExprBreak

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprCall

§

type Adapter = ExprCall

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprCast

§

type Adapter = ExprCast

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprClosure

§

type Adapter = ExprClosure

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprConst

§

type Adapter = ExprConst

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprContinue

§

type Adapter = ExprContinue

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprField

§

type Adapter = ExprField

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprForLoop

§

type Adapter = ExprForLoop

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprGroup

§

type Adapter = ExprGroup

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprIf

§

type Adapter = ExprIf

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprIndex

§

type Adapter = ExprIndex

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprInfer

§

type Adapter = ExprInfer

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprLet

§

type Adapter = ExprLet

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprLit

§

type Adapter = ExprLit

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprLoop

§

type Adapter = ExprLoop

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprMacro

§

type Adapter = ExprMacro

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprMatch

§

type Adapter = ExprMatch

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprMethodCall

§

type Adapter = ExprMethodCall

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprParen

§

type Adapter = ExprParen

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprPath

§

type Adapter = ExprPath

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprRange

§

type Adapter = ExprRange

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprReference

§

type Adapter = ExprReference

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprRepeat

§

type Adapter = ExprRepeat

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprReturn

§

type Adapter = ExprReturn

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprStruct

§

type Adapter = ExprStruct

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprTry

§

type Adapter = ExprTry

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprTryBlock

§

type Adapter = ExprTryBlock

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprTuple

§

type Adapter = ExprTuple

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprUnary

§

type Adapter = ExprUnary

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprUnsafe

§

type Adapter = ExprUnsafe

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprWhile

§

type Adapter = ExprWhile

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ExprYield

§

type Adapter = ExprYield

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for FieldValue

§

type Adapter = FieldValue

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for Index

§

type Adapter = Index

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for Label

§

type Adapter = Label

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for File

§

type Adapter = File

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for BoundLifetimes

§

type Adapter = BoundLifetimes

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ConstParam

§

type Adapter = ConstParam

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for Generics

§

type Adapter = Generics

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for LifetimeParam

§

type Adapter = LifetimeParam

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for PredicateLifetime

§

type Adapter = PredicateLifetime

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for PredicateType

§

type Adapter = PredicateType

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for TraitBound

§

type Adapter = TraitBound

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for TypeParam

§

type Adapter = TypeParam

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for WhereClause

§

type Adapter = WhereClause

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ForeignItemFn

§

type Adapter = ForeignItemFn

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ForeignItemMacro

§

type Adapter = ForeignItemMacro

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ForeignItemStatic

§

type Adapter = ForeignItemStatic

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ForeignItemType

§

type Adapter = ForeignItemType

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ImplItemConst

§

type Adapter = ImplItemConst

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ImplItemFn

§

type Adapter = ImplItemFn

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ImplItemMacro

§

type Adapter = ImplItemMacro

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ImplItemType

§

type Adapter = ImplItemType

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ItemConst

§

type Adapter = ItemConst

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ItemEnum

§

type Adapter = ItemEnum

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ItemExternCrate

§

type Adapter = ItemExternCrate

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ItemFn

§

type Adapter = ItemFn

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ItemForeignMod

§

type Adapter = ItemForeignMod

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ItemImpl

§

type Adapter = ItemImpl

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ItemMacro

§

type Adapter = ItemMacro

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ItemMod

§

type Adapter = ItemMod

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ItemStatic

§

type Adapter = ItemStatic

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ItemStruct

§

type Adapter = ItemStruct

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ItemTrait

§

type Adapter = ItemTrait

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ItemTraitAlias

§

type Adapter = ItemTraitAlias

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ItemType

§

type Adapter = ItemType

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ItemUnion

§

type Adapter = ItemUnion

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ItemUse

§

type Adapter = ItemUse

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for Receiver

§

type Adapter = Receiver

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for Signature

§

type Adapter = Signature

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for TraitItemConst

§

type Adapter = TraitItemConst

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for TraitItemFn

§

type Adapter = TraitItemFn

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for TraitItemMacro

§

type Adapter = TraitItemMacro

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for TraitItemType

§

type Adapter = TraitItemType

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for UseGroup

§

type Adapter = UseGroup

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for UseName

§

type Adapter = UseName

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for UsePath

§

type Adapter = UsePath

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for UseRename

§

type Adapter = UseRename

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for Variadic

§

type Adapter = Variadic

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for Lifetime

§

type Adapter = Lifetime

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for LitBool

§

type Adapter = LitBool

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for Macro

§

type Adapter = Macro

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for FieldPat

§

type Adapter = FieldPat

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for PatIdent

§

type Adapter = PatIdent

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for PatOr

§

type Adapter = PatOr

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for PatParen

§

type Adapter = PatParen

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for PatReference

§

type Adapter = PatReference

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for PatRest

§

type Adapter = PatRest

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for PatSlice

§

type Adapter = PatSlice

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for PatStruct

§

type Adapter = PatStruct

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for PatTuple

§

type Adapter = PatTuple

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for PatTupleStruct

§

type Adapter = PatTupleStruct

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for PatType

§

type Adapter = PatType

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for PatWild

§

type Adapter = PatWild

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for AngleBracketedGenericArguments

§

type Adapter = AngleBracketedGenericArguments

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for AssocConst

§

type Adapter = AssocConst

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for AssocType

§

type Adapter = AssocType

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for Constraint

§

type Adapter = Constraint

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for ParenthesizedGenericArguments

§

type Adapter = ParenthesizedGenericArguments

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for Path

§

type Adapter = Path

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for PathSegment

§

type Adapter = PathSegment

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for QSelf

§

type Adapter = QSelf

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for VisRestricted

§

type Adapter = VisRestricted

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for Block

§

type Adapter = Block

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for Local

§

type Adapter = Local

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for LocalInit

§

type Adapter = LocalInit

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for StmtMacro

§

type Adapter = StmtMacro

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for Abi

§

type Adapter = Abi

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for BareFnArg

§

type Adapter = BareFnArg

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for BareVariadic

§

type Adapter = BareVariadic

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for TypeArray

§

type Adapter = TypeArray

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for TypeBareFn

§

type Adapter = TypeBareFn

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for TypeGroup

§

type Adapter = TypeGroup

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for TypeImplTrait

§

type Adapter = TypeImplTrait

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for TypeMacro

§

type Adapter = TypeMacro

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for TypeParen

§

type Adapter = TypeParen

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for TypePath

§

type Adapter = TypePath

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for TypePtr

§

type Adapter = TypePtr

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for TypeReference

§

type Adapter = TypeReference

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for TypeSlice

§

type Adapter = TypeSlice

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for TypeTraitObject

§

type Adapter = TypeTraitObject

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

source§

impl Syn for TypeTuple

§

type Adapter = TypeTuple

source§

fn to_adapter(&self) -> Self::Adapter

source§

fn from_adapter(adapter: &Self::Adapter) -> Self

Implementors§