pub trait Parse: Sized {
// Required method
fn parse(input: ParseStream<'_>) -> Result<Self>;
}Expand description
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 implementing and using
the Parse trait.
Required Methods§
fn parse(input: ParseStream<'_>) -> Result<Self>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl Parse for Option<Abi>
Available on crate feature parsing only.
impl Parse for Option<Abi>
Available on crate feature
parsing only.fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl Parse for Option<BoundLifetimes>
Available on crate feature parsing only.
impl Parse for Option<BoundLifetimes>
Available on crate feature
parsing only.fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl Parse for Option<Label>
Available on crate feature parsing only.
impl Parse for Option<Label>
Available on crate feature
parsing only.fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl Parse for Option<WhereClause>
Available on crate feature parsing only.
impl Parse for Option<WhereClause>
Available on crate feature
parsing only.fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl Parse for TokenTree
Available on crate feature parsing only.
impl Parse for TokenTree
Available on crate feature
parsing only.fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl Parse for Group
Available on crate feature parsing only.
impl Parse for Group
Available on crate feature
parsing only.fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl Parse for Literal
Available on crate feature parsing only.
impl Parse for Literal
Available on crate feature
parsing only.fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl Parse for Punct
Available on crate feature parsing only.
impl Parse for Punct
Available on crate feature
parsing only.fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl Parse for TokenStream
Available on crate feature parsing only.
impl Parse for TokenStream
Available on crate feature
parsing only.fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl<T: Parse + Token> Parse for Option<T>
Available on crate feature parsing only.
impl<T: Parse + Token> Parse for Option<T>
Available on crate feature
parsing only.fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl<T: Parse> Parse for Box<T>
Available on crate feature parsing only.
impl<T: Parse> Parse for Box<T>
Available on crate feature
parsing only.fn parse(input: ParseStream<'_>) -> Result<Self>
Implementors§
impl Parse for BinOp
Available on crate feature
parsing only.impl Parse for CapturedParam
Available on crate feature
parsing only.impl Parse for Expr
Available on crate feature
parsing only.impl Parse for FnArg
Available on crate feature
parsing only.impl Parse for ForeignItem
Available on crate feature
parsing only.impl Parse for GenericArgument
Available on crate feature
parsing only.impl Parse for GenericParam
Available on crate feature
parsing only.impl Parse for ImplItem
Available on crate feature
parsing only.impl Parse for Item
Available on crate feature
parsing only.impl Parse for Lit
Available on crate feature
parsing only.impl Parse for Member
Available on crate feature
parsing only.impl Parse for Meta
Available on crate feature
parsing only.impl Parse for PointerMutability
Available on crate feature
parsing only.impl Parse for RangeLimits
Available on crate feature
parsing only.impl Parse for ReturnType
Available on crate feature
parsing only.impl Parse for StaticMutability
Available on crate feature
parsing only.impl Parse for Stmt
Available on crate feature
parsing only.impl Parse for TraitBoundModifier
Available on crate feature
parsing only.impl Parse for TraitItem
Available on crate feature
parsing only.impl Parse for syn::Type
Available on crate feature
parsing only.impl Parse for TypeParamBound
Available on crate feature
parsing only.impl Parse for UnOp
Available on crate feature
parsing only.impl Parse for UseTree
Available on crate feature
parsing only.impl Parse for Visibility
Available on crate feature
parsing only.impl Parse for WherePredicate
Available on crate feature
parsing only.impl Parse for Abi
Available on crate feature
parsing only.impl Parse for AngleBracketedGenericArguments
Available on crate feature
parsing only.impl Parse for Arm
Available on crate feature
parsing only.impl Parse for BareFnArg
Available on crate feature
parsing only.impl Parse for Block
Available on crate feature
parsing only.impl Parse for BoundLifetimes
Available on crate feature
parsing only.impl Parse for ConstParam
Available on crate feature
parsing only.impl Parse for DeriveInput
Available on crate feature
parsing only.impl Parse for ExprArray
Available on crate feature
parsing only.impl Parse for ExprAssign
Available on crate feature
parsing only.impl Parse for ExprAsync
Available on crate feature
parsing only.impl Parse for ExprAwait
Available on crate feature
parsing only.impl Parse for ExprBinary
Available on crate feature
parsing only.impl Parse for ExprBlock
Available on crate feature
parsing only.impl Parse for ExprBreak
Available on crate feature
parsing only.impl Parse for ExprCall
Available on crate feature
parsing only.impl Parse for ExprCast
Available on crate feature
parsing only.impl Parse for ExprClosure
Available on crate feature
parsing only.impl Parse for ExprConst
Available on crate feature
parsing only.impl Parse for ExprContinue
Available on crate feature
parsing only.impl Parse for ExprField
Available on crate feature
parsing only.impl Parse for ExprForLoop
Available on crate feature
parsing only.impl Parse for ExprIf
Available on crate feature
parsing only.impl Parse for ExprIndex
Available on crate feature
parsing only.impl Parse for ExprInfer
Available on crate feature
parsing only.impl Parse for ExprLet
Available on crate feature
parsing only.impl Parse for ExprLit
Available on crate feature
parsing only.impl Parse for ExprLoop
Available on crate feature
parsing only.impl Parse for ExprMacro
Available on crate feature
parsing only.impl Parse for ExprMatch
Available on crate feature
parsing only.impl Parse for ExprMethodCall
Available on crate feature
parsing only.impl Parse for ExprParen
Available on crate feature
parsing only.impl Parse for ExprPath
Available on crate feature
parsing only.impl Parse for ExprRange
Available on crate feature
parsing only.impl Parse for ExprRawAddr
Available on crate feature
parsing only.impl Parse for ExprReference
Available on crate feature
parsing only.impl Parse for ExprRepeat
Available on crate feature
parsing only.impl Parse for ExprReturn
Available on crate feature
parsing only.impl Parse for ExprStruct
Available on crate feature
parsing only.impl Parse for ExprTry
Available on crate feature
parsing only.impl Parse for ExprTryBlock
Available on crate feature
parsing only.impl Parse for ExprTuple
Available on crate feature
parsing only.impl Parse for ExprUnary
Available on crate feature
parsing only.impl Parse for ExprUnsafe
Available on crate feature
parsing only.impl Parse for ExprWhile
Available on crate feature
parsing only.impl Parse for ExprYield
Available on crate feature
parsing only.impl Parse for FieldValue
Available on crate feature
parsing only.impl Parse for FieldsNamed
Available on crate feature
parsing only.impl Parse for FieldsUnnamed
Available on crate feature
parsing only.impl Parse for File
Available on crate feature
parsing only.impl Parse for ForeignItemFn
Available on crate feature
parsing only.impl Parse for ForeignItemMacro
Available on crate feature
parsing only.impl Parse for ForeignItemStatic
Available on crate feature
parsing only.impl Parse for ForeignItemType
Available on crate feature
parsing only.impl Parse for Generics
Available on crate feature
parsing only.impl Parse for Ident
Available on crate feature
parsing only.impl Parse for ImplItemConst
Available on crate feature
parsing only.impl Parse for ImplItemFn
Available on crate feature
parsing only.impl Parse for ImplItemMacro
Available on crate feature
parsing only.impl Parse for ImplItemType
Available on crate feature
parsing only.impl Parse for Index
Available on crate feature
parsing only.impl Parse for ItemConst
Available on crate feature
parsing only.impl Parse for ItemEnum
Available on crate feature
parsing only.impl Parse for ItemExternCrate
Available on crate feature
parsing only.impl Parse for ItemFn
Available on crate feature
parsing only.impl Parse for ItemForeignMod
Available on crate feature
parsing only.impl Parse for ItemImpl
Available on crate feature
parsing only.impl Parse for ItemMacro
Available on crate feature
parsing only.impl Parse for ItemMod
Available on crate feature
parsing only.impl Parse for ItemStatic
Available on crate feature
parsing only.impl Parse for ItemStruct
Available on crate feature
parsing only.impl Parse for ItemTrait
Available on crate feature
parsing only.impl Parse for ItemTraitAlias
Available on crate feature
parsing only.impl Parse for ItemType
Available on crate feature
parsing only.impl Parse for ItemUnion
Available on crate feature
parsing only.impl Parse for ItemUse
Available on crate feature
parsing only.impl Parse for Label
Available on crate feature
parsing only.impl Parse for Lifetime
Available on crate feature
parsing only.impl Parse for LifetimeParam
Available on crate feature
parsing only.impl Parse for LitBool
Available on crate feature
parsing only.impl Parse for LitByte
Available on crate feature
parsing only.impl Parse for LitByteStr
Available on crate feature
parsing only.impl Parse for LitCStr
Available on crate feature
parsing only.impl Parse for LitChar
Available on crate feature
parsing only.impl Parse for LitFloat
Available on crate feature
parsing only.impl Parse for LitInt
Available on crate feature
parsing only.impl Parse for LitStr
Available on crate feature
parsing only.impl Parse for syn::Macro
Available on crate feature
parsing only.impl Parse for MetaList
Available on crate feature
parsing only.impl Parse for MetaNameValue
Available on crate feature
parsing only.impl Parse for ParenthesizedGenericArguments
Available on crate feature
parsing only.impl Parse for PatType
Available on crate feature
parsing only.impl Parse for Path
Available on crate feature
parsing only.impl Parse for PathSegment
Available on crate feature
parsing only.impl Parse for PreciseCapture
Available on crate feature
parsing only.impl Parse for Receiver
Available on crate feature
parsing only.impl Parse for Signature
Available on crate feature
parsing only.impl Parse for TraitBound
Available on crate feature
parsing only.impl Parse for TraitItemConst
Available on crate feature
parsing only.impl Parse for TraitItemFn
Available on crate feature
parsing only.impl Parse for TraitItemMacro
Available on crate feature
parsing only.impl Parse for TraitItemType
Available on crate feature
parsing only.impl Parse for TypeArray
Available on crate feature
parsing only.impl Parse for TypeBareFn
Available on crate feature
parsing only.impl Parse for TypeGroup
Available on crate feature
parsing only.impl Parse for TypeImplTrait
Available on crate feature
parsing only.impl Parse for TypeInfer
Available on crate feature
parsing only.impl Parse for TypeMacro
Available on crate feature
parsing only.impl Parse for TypeNever
Available on crate feature
parsing only.impl Parse for TypeParam
Available on crate feature
parsing only.impl Parse for TypeParen
Available on crate feature
parsing only.impl Parse for TypePath
Available on crate feature
parsing only.impl Parse for TypePtr
Available on crate feature
parsing only.impl Parse for TypeReference
Available on crate feature
parsing only.impl Parse for TypeSlice
Available on crate feature
parsing only.impl Parse for TypeTraitObject
Available on crate feature
parsing only.impl Parse for TypeTuple
Available on crate feature
parsing only.impl Parse for Variant
Available on crate feature
parsing only.impl Parse for WhereClause
Available on crate feature
parsing only.impl Parse for Abstract
Available on crate feature
parsing only.impl Parse for And
Available on crate feature
parsing only.impl Parse for AndAnd
Available on crate feature
parsing only.impl Parse for AndEq
Available on crate feature
parsing only.impl Parse for As
Available on crate feature
parsing only.impl Parse for Async
Available on crate feature
parsing only.impl Parse for At
Available on crate feature
parsing only.impl Parse for Auto
Available on crate feature
parsing only.impl Parse for Await
Available on crate feature
parsing only.impl Parse for Become
Available on crate feature
parsing only.impl Parse for syn::token::Box
Available on crate feature
parsing only.impl Parse for Break
Available on crate feature
parsing only.impl Parse for Caret
Available on crate feature
parsing only.impl Parse for CaretEq
Available on crate feature
parsing only.impl Parse for Colon
Available on crate feature
parsing only.impl Parse for Comma
Available on crate feature
parsing only.impl Parse for Const
Available on crate feature
parsing only.impl Parse for Continue
Available on crate feature
parsing only.impl Parse for Crate
Available on crate feature
parsing only.impl Parse for Default
Available on crate feature
parsing only.impl Parse for Do
Available on crate feature
parsing only.impl Parse for Dollar
Available on crate feature
parsing only.impl Parse for Dot
Available on crate feature
parsing only.impl Parse for DotDot
Available on crate feature
parsing only.impl Parse for DotDotDot
Available on crate feature
parsing only.impl Parse for DotDotEq
Available on crate feature
parsing only.impl Parse for Dyn
Available on crate feature
parsing only.impl Parse for Else
Available on crate feature
parsing only.impl Parse for Enum
Available on crate feature
parsing only.impl Parse for Eq
Available on crate feature
parsing only.impl Parse for EqEq
Available on crate feature
parsing only.impl Parse for Extern
Available on crate feature
parsing only.impl Parse for FatArrow
Available on crate feature
parsing only.impl Parse for Final
Available on crate feature
parsing only.impl Parse for Fn
Available on crate feature
parsing only.impl Parse for For
Available on crate feature
parsing only.impl Parse for Ge
Available on crate feature
parsing only.impl Parse for Gt
Available on crate feature
parsing only.impl Parse for If
Available on crate feature
parsing only.impl Parse for Impl
Available on crate feature
parsing only.impl Parse for In
Available on crate feature
parsing only.impl Parse for LArrow
Available on crate feature
parsing only.impl Parse for Le
Available on crate feature
parsing only.impl Parse for Let
Available on crate feature
parsing only.impl Parse for Loop
Available on crate feature
parsing only.impl Parse for Lt
Available on crate feature
parsing only.impl Parse for syn::token::Macro
Available on crate feature
parsing only.impl Parse for Match
Available on crate feature
parsing only.impl Parse for Minus
Available on crate feature
parsing only.impl Parse for MinusEq
Available on crate feature
parsing only.impl Parse for Mod
Available on crate feature
parsing only.impl Parse for Move
Available on crate feature
parsing only.impl Parse for Mut
Available on crate feature
parsing only.impl Parse for Ne
Available on crate feature
parsing only.impl Parse for Not
Available on crate feature
parsing only.impl Parse for Or
Available on crate feature
parsing only.impl Parse for OrEq
Available on crate feature
parsing only.impl Parse for OrOr
Available on crate feature
parsing only.impl Parse for Override
Available on crate feature
parsing only.impl Parse for PathSep
Available on crate feature
parsing only.impl Parse for Percent
Available on crate feature
parsing only.impl Parse for PercentEq
Available on crate feature
parsing only.impl Parse for Plus
Available on crate feature
parsing only.impl Parse for PlusEq
Available on crate feature
parsing only.impl Parse for Pound
Available on crate feature
parsing only.impl Parse for Priv
Available on crate feature
parsing only.impl Parse for Pub
Available on crate feature
parsing only.impl Parse for Question
Available on crate feature
parsing only.impl Parse for RArrow
Available on crate feature
parsing only.impl Parse for Raw
Available on crate feature
parsing only.impl Parse for Ref
Available on crate feature
parsing only.impl Parse for Return
Available on crate feature
parsing only.impl Parse for SelfType
Available on crate feature
parsing only.impl Parse for SelfValue
Available on crate feature
parsing only.impl Parse for Semi
Available on crate feature
parsing only.impl Parse for Shl
Available on crate feature
parsing only.impl Parse for ShlEq
Available on crate feature
parsing only.impl Parse for Shr
Available on crate feature
parsing only.impl Parse for ShrEq
Available on crate feature
parsing only.impl Parse for Slash
Available on crate feature
parsing only.impl Parse for SlashEq
Available on crate feature
parsing only.impl Parse for Star
Available on crate feature
parsing only.impl Parse for StarEq
Available on crate feature
parsing only.impl Parse for Static
Available on crate feature
parsing only.impl Parse for Struct
Available on crate feature
parsing only.impl Parse for Super
Available on crate feature
parsing only.impl Parse for Tilde
Available on crate feature
parsing only.impl Parse for Trait
Available on crate feature
parsing only.impl Parse for Try
Available on crate feature
parsing only.impl Parse for syn::token::Type
Available on crate feature
parsing only.impl Parse for Typeof
Available on crate feature
parsing only.impl Parse for Underscore
Available on crate feature
parsing only.impl Parse for Union
Available on crate feature
parsing only.impl Parse for Unsafe
Available on crate feature
parsing only.impl Parse for Unsized
Available on crate feature
parsing only.impl Parse for Use
Available on crate feature
parsing only.impl Parse for Virtual
Available on crate feature
parsing only.impl Parse for Where
Available on crate feature
parsing only.impl Parse for While
Available on crate feature
parsing only.impl Parse for Yield
Available on crate feature
parsing only.impl Parse for Nothing
Available on crate feature
parsing only.