[−][src]Trait syn::synom::Synom
Parsing interface implemented by all types that can be parsed in a default way from a token stream.
Refer to the module documentation for details about parsing in Syn.
This trait is available if Syn is built with the "parsing"
feature.
Required Methods
Provided Methods
fn description() -> Option<&'static str>
[−]
A short name of the type being parsed.
The description should only be used for a simple name. It should not contain newlines or sentence-ending punctuation, to facilitate embedding in larger user-facing strings. Syn will use this description when building error messages about parse failures.
Examples
struct ExprMacro { // ... } impl Synom for ExprMacro { // fn parse(...) -> ... { ... } fn description() -> Option<&'static str> { // Will result in messages like // // "failed to parse macro invocation expression: $reason" Some("macro invocation expression") } }
Implementations on Foreign Types
impl Synom for TokenStream
[src]
[−]
impl Synom for TokenStream
impl Synom for TokenTree
[src]
[−]
impl Synom for TokenTree
impl Synom for Group
[src]
[−]
impl Synom for Group
impl Synom for Punct
[src]
[−]
impl Synom for Punct
impl Synom for Literal
[src]
[−]
impl Synom for Literal
Implementors
impl Synom for BareFnArgName
[src]
[−]
impl Synom for BareFnArgName
impl Synom for Expr
[src]
[−]
impl Synom for Expr
impl Synom for FnArg
[src]
[−]
impl Synom for FnArg
impl Synom for ForeignItem
[src]
[−]
impl Synom for ForeignItem
impl Synom for GenericArgument
[src]
[−]
impl Synom for GenericArgument
impl Synom for GenericMethodArgument
[src]
[−]
impl Synom for GenericMethodArgument
impl Synom for GenericParam
[src]
[−]
impl Synom for GenericParam
impl Synom for ImplItem
[src]
[−]
impl Synom for ImplItem
impl Synom for Item
[src]
[−]
impl Synom for Item
impl Synom for Lit
[src]
[−]
impl Synom for Lit
impl Synom for Member
[src]
[−]
impl Synom for Member
impl Synom for Pat
[src]
[−]
impl Synom for Pat
impl Synom for RangeLimits
[src]
[−]
impl Synom for RangeLimits
impl Synom for ReturnType
[src]
[−]
impl Synom for ReturnType
impl Synom for Stmt
[src]
[−]
impl Synom for Stmt
impl Synom for TraitBoundModifier
[src]
[−]
impl Synom for TraitBoundModifier
impl Synom for TraitItem
[src]
[−]
impl Synom for TraitItem
impl Synom for syn::Type
[src]
[−]
impl Synom for syn::Type
impl Synom for TypeParamBound
[src]
[−]
impl Synom for TypeParamBound
impl Synom for UnOp
[src]
[−]
impl Synom for UnOp
impl Synom for UseTree
[src]
[−]
impl Synom for UseTree
impl Synom for Visibility
[src]
[−]
impl Synom for Visibility
impl Synom for WherePredicate
[src]
[−]
impl Synom for WherePredicate
impl Synom for Abi
[src]
[−]
impl Synom for Abi
impl Synom for AngleBracketedGenericArguments
[src]
[−]
impl Synom for AngleBracketedGenericArguments
impl Synom for Arm
[src]
[−]
impl Synom for Arm
impl Synom for BareFnArg
[src]
[−]
impl Synom for BareFnArg
impl Synom for Binding
[src]
[−]
impl Synom for Binding
impl Synom for Block
[src]
[−]
impl Synom for Block
impl Synom for BoundLifetimes
[src]
[−]
impl Synom for BoundLifetimes
impl Synom for ConstParam
[src]
[−]
impl Synom for ConstParam
impl Synom for DeriveInput
[src]
[−]
impl Synom for DeriveInput
impl Synom for ExprArray
[src]
[−]
impl Synom for ExprArray
impl Synom for ExprBlock
[src]
[−]
impl Synom for ExprBlock
impl Synom for ExprCatch
[src]
[−]
impl Synom for ExprCatch
impl Synom for ExprContinue
[src]
[−]
impl Synom for ExprContinue
impl Synom for ExprForLoop
[src]
[−]
impl Synom for ExprForLoop
impl Synom for ExprGroup
[src]
[−]
impl Synom for ExprGroup
impl Synom for ExprIf
[src]
[−]
impl Synom for ExprIf
impl Synom for ExprIfLet
[src]
[−]
impl Synom for ExprIfLet
impl Synom for ExprLit
[src]
[−]
impl Synom for ExprLit
impl Synom for ExprLoop
[src]
[−]
impl Synom for ExprLoop
impl Synom for ExprMacro
[src]
[−]
impl Synom for ExprMacro
impl Synom for ExprMatch
[src]
[−]
impl Synom for ExprMatch
impl Synom for ExprParen
[src]
[−]
impl Synom for ExprParen
impl Synom for ExprPath
[src]
[−]
impl Synom for ExprPath
impl Synom for ExprRepeat
[src]
[−]
impl Synom for ExprRepeat
impl Synom for ExprStruct
[src]
[−]
impl Synom for ExprStruct
impl Synom for ExprTuple
[src]
[−]
impl Synom for ExprTuple
impl Synom for ExprUnsafe
[src]
[−]
impl Synom for ExprUnsafe
impl Synom for ExprWhile
[src]
[−]
impl Synom for ExprWhile
impl Synom for ExprWhileLet
[src]
[−]
impl Synom for ExprWhileLet
impl Synom for ExprYield
[src]
[−]
impl Synom for ExprYield
impl Synom for FieldPat
[src]
[−]
impl Synom for FieldPat
impl Synom for FieldValue
[src]
[−]
impl Synom for FieldValue
impl Synom for FieldsNamed
[src]
[−]
impl Synom for FieldsNamed
impl Synom for FieldsUnnamed
[src]
[−]
impl Synom for FieldsUnnamed
impl Synom for File
[src]
[−]
impl Synom for File
impl Synom for ForeignItemFn
[src]
[−]
impl Synom for ForeignItemFn
impl Synom for ForeignItemStatic
[src]
[−]
impl Synom for ForeignItemStatic
impl Synom for ForeignItemType
[src]
[−]
impl Synom for ForeignItemType
impl Synom for Generics
[src]
[−]
impl Synom for Generics
impl Synom for Ident
[src]
[−]
impl Synom for Ident
impl Synom for ImplItemConst
[src]
[−]
impl Synom for ImplItemConst
impl Synom for ImplItemMacro
[src]
[−]
impl Synom for ImplItemMacro
impl Synom for ImplItemMethod
[src]
[−]
impl Synom for ImplItemMethod
impl Synom for ImplItemType
[src]
[−]
impl Synom for ImplItemType
impl Synom for Index
[src]
[−]
impl Synom for Index
impl Synom for ItemConst
[src]
[−]
impl Synom for ItemConst
impl Synom for ItemEnum
[src]
[−]
impl Synom for ItemEnum
impl Synom for ItemExternCrate
[src]
[−]
impl Synom for ItemExternCrate
impl Synom for ItemFn
[src]
[−]
impl Synom for ItemFn
impl Synom for ItemForeignMod
[src]
[−]
impl Synom for ItemForeignMod
impl Synom for ItemImpl
[src]
[−]
impl Synom for ItemImpl
impl Synom for ItemMacro
[src]
[−]
impl Synom for ItemMacro
impl Synom for ItemMacro2
[src]
[−]
impl Synom for ItemMacro2
impl Synom for ItemMod
[src]
[−]
impl Synom for ItemMod
impl Synom for ItemStatic
[src]
[−]
impl Synom for ItemStatic
impl Synom for ItemStruct
[src]
[−]
impl Synom for ItemStruct
impl Synom for ItemTrait
[src]
[−]
impl Synom for ItemTrait
impl Synom for ItemType
[src]
[−]
impl Synom for ItemType
impl Synom for ItemUnion
[src]
[−]
impl Synom for ItemUnion
impl Synom for ItemUse
[src]
[−]
impl Synom for ItemUse
impl Synom for Label
[src]
[−]
impl Synom for Label
impl Synom for Lifetime
[src]
[−]
impl Synom for Lifetime
impl Synom for LifetimeDef
[src]
[−]
impl Synom for LifetimeDef
impl Synom for LitBool
[src]
[−]
impl Synom for LitBool
impl Synom for LitByte
[src]
[−]
impl Synom for LitByte
impl Synom for LitByteStr
[src]
[−]
impl Synom for LitByteStr
impl Synom for LitChar
[src]
[−]
impl Synom for LitChar
impl Synom for LitFloat
[src]
[−]
impl Synom for LitFloat
impl Synom for LitInt
[src]
[−]
impl Synom for LitInt
impl Synom for LitStr
[src]
[−]
impl Synom for LitStr
impl Synom for syn::Macro
[src]
[−]
impl Synom for syn::Macro
impl Synom for ParenthesizedGenericArguments
[src]
[−]
impl Synom for ParenthesizedGenericArguments
impl Synom for PatBox
[src]
[−]
impl Synom for PatBox
impl Synom for PatIdent
[src]
[−]
impl Synom for PatIdent
impl Synom for PatLit
[src]
[−]
impl Synom for PatLit
impl Synom for PatMacro
[src]
[−]
impl Synom for PatMacro
impl Synom for PatPath
[src]
[−]
impl Synom for PatPath
impl Synom for PatRange
[src]
[−]
impl Synom for PatRange
impl Synom for PatRef
[src]
[−]
impl Synom for PatRef
impl Synom for PatSlice
[src]
[−]
impl Synom for PatSlice
impl Synom for PatStruct
[src]
[−]
impl Synom for PatStruct
impl Synom for PatTuple
[src]
[−]
impl Synom for PatTuple
impl Synom for PatTupleStruct
[src]
[−]
impl Synom for PatTupleStruct
impl Synom for PatWild
[src]
[−]
impl Synom for PatWild
impl Synom for Path
[src]
[−]
impl Synom for Path
impl Synom for PathSegment
[src]
[−]
impl Synom for PathSegment
impl Synom for TraitBound
[src]
[−]
impl Synom for TraitBound
impl Synom for TraitItemConst
[src]
[−]
impl Synom for TraitItemConst
impl Synom for TraitItemMacro
[src]
[−]
impl Synom for TraitItemMacro
impl Synom for TraitItemMethod
[src]
[−]
impl Synom for TraitItemMethod
impl Synom for TraitItemType
[src]
[−]
impl Synom for TraitItemType
impl Synom for TypeArray
[src]
[−]
impl Synom for TypeArray
impl Synom for TypeBareFn
[src]
[−]
impl Synom for TypeBareFn
impl Synom for TypeGroup
[src]
[−]
impl Synom for TypeGroup
impl Synom for TypeImplTrait
[src]
[−]
impl Synom for TypeImplTrait
impl Synom for TypeInfer
[src]
[−]
impl Synom for TypeInfer
impl Synom for TypeMacro
[src]
[−]
impl Synom for TypeMacro
impl Synom for TypeNever
[src]
[−]
impl Synom for TypeNever
impl Synom for TypeParam
[src]
[−]
impl Synom for TypeParam
impl Synom for TypeParen
[src]
[−]
impl Synom for TypeParen
impl Synom for TypePath
[src]
[−]
impl Synom for TypePath
impl Synom for TypePtr
[src]
[−]
impl Synom for TypePtr
impl Synom for TypeReference
[src]
[−]
impl Synom for TypeReference
impl Synom for TypeSlice
[src]
[−]
impl Synom for TypeSlice
impl Synom for TypeTraitObject
[src]
[−]
impl Synom for TypeTraitObject
impl Synom for TypeTuple
[src]
[−]
impl Synom for TypeTuple
impl Synom for UseGlob
[src]
[−]
impl Synom for UseGlob
impl Synom for UseGroup
[src]
[−]
impl Synom for UseGroup
impl Synom for UseName
[src]
[−]
impl Synom for UseName
impl Synom for UsePath
[src]
[−]
impl Synom for UsePath
impl Synom for UseRename
[src]
[−]
impl Synom for UseRename
impl Synom for Variant
[src]
[−]
impl Synom for Variant
impl Synom for WhereClause
[src]
[−]
impl Synom for WhereClause
impl Synom for Add
[src]
[−]
impl Synom for Add
impl Synom for AddEq
[src]
[−]
impl Synom for AddEq
impl Synom for And
[src]
[−]
impl Synom for And
impl Synom for AndAnd
[src]
[−]
impl Synom for AndAnd
impl Synom for AndEq
[src]
[−]
impl Synom for AndEq
impl Synom for Apostrophe
[src]
[−]
impl Synom for Apostrophe
fn parse(input: Cursor) -> PResult<Apostrophe>
[src]
fn parse(input: Cursor) -> PResult<Apostrophe>
fn description() -> Option<&'static str>
[src]
fn description() -> Option<&'static str>
impl Synom for As
[src]
[−]
impl Synom for As
impl Synom for Async
[src]
[−]
impl Synom for Async
impl Synom for At
[src]
[−]
impl Synom for At
impl Synom for Auto
[src]
[−]
impl Synom for Auto
impl Synom for Bang
[src]
[−]
impl Synom for Bang
impl Synom for Box
[src]
[−]
impl Synom for Box
impl Synom for Break
[src]
[−]
impl Synom for Break
impl Synom for CapSelf
[src]
[−]
impl Synom for CapSelf
impl Synom for Caret
[src]
[−]
impl Synom for Caret
impl Synom for CaretEq
[src]
[−]
impl Synom for CaretEq
impl Synom for Catch
[src]
[−]
impl Synom for Catch
impl Synom for Colon
[src]
[−]
impl Synom for Colon
impl Synom for Colon2
[src]
[−]
impl Synom for Colon2
impl Synom for Comma
[src]
[−]
impl Synom for Comma
impl Synom for Const
[src]
[−]
impl Synom for Const
impl Synom for Continue
[src]
[−]
impl Synom for Continue
impl Synom for Crate
[src]
[−]
impl Synom for Crate
impl Synom for Default
[src]
[−]
impl Synom for Default
impl Synom for Div
[src]
[−]
impl Synom for Div
impl Synom for DivEq
[src]
[−]
impl Synom for DivEq
impl Synom for Do
[src]
[−]
impl Synom for Do
impl Synom for Dollar
[src]
[−]
impl Synom for Dollar
impl Synom for Dot
[src]
[−]
impl Synom for Dot
impl Synom for Dot2
[src]
[−]
impl Synom for Dot2
impl Synom for Dot3
[src]
[−]
impl Synom for Dot3
impl Synom for DotDotEq
[src]
[−]
impl Synom for DotDotEq
impl Synom for Dyn
[src]
[−]
impl Synom for Dyn
impl Synom for Else
[src]
[−]
impl Synom for Else
impl Synom for Enum
[src]
[−]
impl Synom for Enum
impl Synom for Eq
[src]
[−]
impl Synom for Eq
impl Synom for EqEq
[src]
[−]
impl Synom for EqEq
impl Synom for Extern
[src]
[−]
impl Synom for Extern
impl Synom for FatArrow
[src]
[−]
impl Synom for FatArrow
impl Synom for Fn
[src]
[−]
impl Synom for Fn
impl Synom for For
[src]
[−]
impl Synom for For
impl Synom for Ge
[src]
[−]
impl Synom for Ge
impl Synom for Gt
[src]
[−]
impl Synom for Gt
impl Synom for If
[src]
[−]
impl Synom for If
impl Synom for Impl
[src]
[−]
impl Synom for Impl
impl Synom for In
[src]
[−]
impl Synom for In
impl Synom for LArrow
[src]
[−]
impl Synom for LArrow
impl Synom for Le
[src]
[−]
impl Synom for Le
impl Synom for Let
[src]
[−]
impl Synom for Let
impl Synom for Loop
[src]
[−]
impl Synom for Loop
impl Synom for Lt
[src]
[−]
impl Synom for Lt
impl Synom for syn::token::Macro
[src]
[−]
impl Synom for syn::token::Macro
impl Synom for Match
[src]
[−]
impl Synom for Match
impl Synom for Mod
[src]
[−]
impl Synom for Mod
impl Synom for Move
[src]
[−]
impl Synom for Move
impl Synom for MulEq
[src]
[−]
impl Synom for MulEq
impl Synom for Mut
[src]
[−]
impl Synom for Mut
impl Synom for Ne
[src]
[−]
impl Synom for Ne
impl Synom for Or
[src]
[−]
impl Synom for Or
impl Synom for OrEq
[src]
[−]
impl Synom for OrEq
impl Synom for OrOr
[src]
[−]
impl Synom for OrOr
impl Synom for Pound
[src]
[−]
impl Synom for Pound
impl Synom for Pub
[src]
[−]
impl Synom for Pub
impl Synom for Question
[src]
[−]
impl Synom for Question
impl Synom for RArrow
[src]
[−]
impl Synom for RArrow
impl Synom for Ref
[src]
[−]
impl Synom for Ref
impl Synom for Rem
[src]
[−]
impl Synom for Rem
impl Synom for RemEq
[src]
[−]
impl Synom for RemEq
impl Synom for Return
[src]
[−]
impl Synom for Return
impl Synom for Self_
[src]
[−]
impl Synom for Self_
impl Synom for Semi
[src]
[−]
impl Synom for Semi
impl Synom for Shl
[src]
[−]
impl Synom for Shl
impl Synom for ShlEq
[src]
[−]
impl Synom for ShlEq
impl Synom for Shr
[src]
[−]
impl Synom for Shr
impl Synom for ShrEq
[src]
[−]
impl Synom for ShrEq
impl Synom for Star
[src]
[−]
impl Synom for Star
impl Synom for Static
[src]
[−]
impl Synom for Static
impl Synom for Struct
[src]
[−]
impl Synom for Struct
impl Synom for Sub
[src]
[−]
impl Synom for Sub
impl Synom for SubEq
[src]
[−]
impl Synom for SubEq
impl Synom for Super
[src]
[−]
impl Synom for Super
impl Synom for Trait
[src]
[−]
impl Synom for Trait
impl Synom for syn::token::Type
[src]
[−]
impl Synom for syn::token::Type
impl Synom for Underscore
[src]
[−]
impl Synom for Underscore
fn parse(input: Cursor) -> PResult<Underscore>
[src]
fn parse(input: Cursor) -> PResult<Underscore>
fn description() -> Option<&'static str>
[src]
fn description() -> Option<&'static str>
impl Synom for Union
[src]
[−]
impl Synom for Union
impl Synom for Unsafe
[src]
[−]
impl Synom for Unsafe
impl Synom for Use
[src]
[−]
impl Synom for Use
impl Synom for Where
[src]
[−]
impl Synom for Where
impl Synom for While
[src]
[−]
impl Synom for While
impl Synom for Yield
[src]
[−]
impl Synom for Yield