Parse

Trait Parse 

Source
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§

Source

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.
Source§

fn parse(input: ParseStream<'_>) -> Result<Self>

Source§

impl Parse for Option<BoundLifetimes>

Available on crate feature parsing only.
Source§

fn parse(input: ParseStream<'_>) -> Result<Self>

Source§

impl Parse for Option<Label>

Available on crate feature parsing only.
Source§

fn parse(input: ParseStream<'_>) -> Result<Self>

Source§

impl Parse for Option<WhereClause>

Available on crate feature parsing only.
Source§

fn parse(input: ParseStream<'_>) -> Result<Self>

Source§

impl Parse for TokenTree

Available on crate feature parsing only.
Source§

fn parse(input: ParseStream<'_>) -> Result<Self>

Source§

impl Parse for Group

Available on crate feature parsing only.
Source§

fn parse(input: ParseStream<'_>) -> Result<Self>

Source§

impl Parse for Literal

Available on crate feature parsing only.
Source§

fn parse(input: ParseStream<'_>) -> Result<Self>

Source§

impl Parse for Punct

Available on crate feature parsing only.
Source§

fn parse(input: ParseStream<'_>) -> Result<Self>

Source§

impl Parse for TokenStream

Available on crate feature parsing only.
Source§

fn parse(input: ParseStream<'_>) -> Result<Self>

Source§

impl<T: Parse + Token> Parse for Option<T>

Available on crate feature parsing only.
Source§

fn parse(input: ParseStream<'_>) -> Result<Self>

Source§

impl<T: Parse> Parse for Box<T>

Available on crate feature parsing only.
Source§

fn parse(input: ParseStream<'_>) -> Result<Self>

Implementors§

Source§

impl Parse for BinOp

Available on crate feature parsing only.
Source§

impl Parse for CapturedParam

Available on crate feature parsing only.
Source§

impl Parse for Expr

Available on crate feature parsing only.
Source§

impl Parse for FnArg

Available on crate feature parsing only.
Source§

impl Parse for ForeignItem

Available on crate feature parsing only.
Source§

impl Parse for GenericArgument

Available on crate feature parsing only.
Source§

impl Parse for GenericParam

Available on crate feature parsing only.
Source§

impl Parse for ImplItem

Available on crate feature parsing only.
Source§

impl Parse for Item

Available on crate feature parsing only.
Source§

impl Parse for Lit

Available on crate feature parsing only.
Source§

impl Parse for Member

Available on crate feature parsing only.
Source§

impl Parse for Meta

Available on crate feature parsing only.
Source§

impl Parse for PointerMutability

Available on crate feature parsing only.
Source§

impl Parse for RangeLimits

Available on crate feature parsing only.
Source§

impl Parse for ReturnType

Available on crate feature parsing only.
Source§

impl Parse for StaticMutability

Available on crate feature parsing only.
Source§

impl Parse for Stmt

Available on crate feature parsing only.
Source§

impl Parse for TraitBoundModifier

Available on crate feature parsing only.
Source§

impl Parse for TraitItem

Available on crate feature parsing only.
Source§

impl Parse for syn::Type

Available on crate feature parsing only.
Source§

impl Parse for TypeParamBound

Available on crate feature parsing only.
Source§

impl Parse for UnOp

Available on crate feature parsing only.
Source§

impl Parse for UseTree

Available on crate feature parsing only.
Source§

impl Parse for Visibility

Available on crate feature parsing only.
Source§

impl Parse for WherePredicate

Available on crate feature parsing only.
Source§

impl Parse for Abi

Available on crate feature parsing only.
Source§

impl Parse for AngleBracketedGenericArguments

Available on crate feature parsing only.
Source§

impl Parse for Arm

Available on crate feature parsing only.
Source§

impl Parse for BareFnArg

Available on crate feature parsing only.
Source§

impl Parse for Block

Available on crate feature parsing only.
Source§

impl Parse for BoundLifetimes

Available on crate feature parsing only.
Source§

impl Parse for ConstParam

Available on crate feature parsing only.
Source§

impl Parse for DeriveInput

Available on crate feature parsing only.
Source§

impl Parse for ExprArray

Available on crate feature parsing only.
Source§

impl Parse for ExprAssign

Available on crate feature parsing only.
Source§

impl Parse for ExprAsync

Available on crate feature parsing only.
Source§

impl Parse for ExprAwait

Available on crate feature parsing only.
Source§

impl Parse for ExprBinary

Available on crate feature parsing only.
Source§

impl Parse for ExprBlock

Available on crate feature parsing only.
Source§

impl Parse for ExprBreak

Available on crate feature parsing only.
Source§

impl Parse for ExprCall

Available on crate feature parsing only.
Source§

impl Parse for ExprCast

Available on crate feature parsing only.
Source§

impl Parse for ExprClosure

Available on crate feature parsing only.
Source§

impl Parse for ExprConst

Available on crate feature parsing only.
Source§

impl Parse for ExprContinue

Available on crate feature parsing only.
Source§

impl Parse for ExprField

Available on crate feature parsing only.
Source§

impl Parse for ExprForLoop

Available on crate feature parsing only.
Source§

impl Parse for ExprIf

Available on crate feature parsing only.
Source§

impl Parse for ExprIndex

Available on crate feature parsing only.
Source§

impl Parse for ExprInfer

Available on crate feature parsing only.
Source§

impl Parse for ExprLet

Available on crate feature parsing only.
Source§

impl Parse for ExprLit

Available on crate feature parsing only.
Source§

impl Parse for ExprLoop

Available on crate feature parsing only.
Source§

impl Parse for ExprMacro

Available on crate feature parsing only.
Source§

impl Parse for ExprMatch

Available on crate feature parsing only.
Source§

impl Parse for ExprMethodCall

Available on crate feature parsing only.
Source§

impl Parse for ExprParen

Available on crate feature parsing only.
Source§

impl Parse for ExprPath

Available on crate feature parsing only.
Source§

impl Parse for ExprRange

Available on crate feature parsing only.
Source§

impl Parse for ExprRawAddr

Available on crate feature parsing only.
Source§

impl Parse for ExprReference

Available on crate feature parsing only.
Source§

impl Parse for ExprRepeat

Available on crate feature parsing only.
Source§

impl Parse for ExprReturn

Available on crate feature parsing only.
Source§

impl Parse for ExprStruct

Available on crate feature parsing only.
Source§

impl Parse for ExprTry

Available on crate feature parsing only.
Source§

impl Parse for ExprTryBlock

Available on crate feature parsing only.
Source§

impl Parse for ExprTuple

Available on crate feature parsing only.
Source§

impl Parse for ExprUnary

Available on crate feature parsing only.
Source§

impl Parse for ExprUnsafe

Available on crate feature parsing only.
Source§

impl Parse for ExprWhile

Available on crate feature parsing only.
Source§

impl Parse for ExprYield

Available on crate feature parsing only.
Source§

impl Parse for FieldValue

Available on crate feature parsing only.
Source§

impl Parse for FieldsNamed

Available on crate feature parsing only.
Source§

impl Parse for FieldsUnnamed

Available on crate feature parsing only.
Source§

impl Parse for File

Available on crate feature parsing only.
Source§

impl Parse for ForeignItemFn

Available on crate feature parsing only.
Source§

impl Parse for ForeignItemMacro

Available on crate feature parsing only.
Source§

impl Parse for ForeignItemStatic

Available on crate feature parsing only.
Source§

impl Parse for ForeignItemType

Available on crate feature parsing only.
Source§

impl Parse for Generics

Available on crate feature parsing only.
Source§

impl Parse for Ident

Available on crate feature parsing only.
Source§

impl Parse for ImplItemConst

Available on crate feature parsing only.
Source§

impl Parse for ImplItemFn

Available on crate feature parsing only.
Source§

impl Parse for ImplItemMacro

Available on crate feature parsing only.
Source§

impl Parse for ImplItemType

Available on crate feature parsing only.
Source§

impl Parse for Index

Available on crate feature parsing only.
Source§

impl Parse for ItemConst

Available on crate feature parsing only.
Source§

impl Parse for ItemEnum

Available on crate feature parsing only.
Source§

impl Parse for ItemExternCrate

Available on crate feature parsing only.
Source§

impl Parse for ItemFn

Available on crate feature parsing only.
Source§

impl Parse for ItemForeignMod

Available on crate feature parsing only.
Source§

impl Parse for ItemImpl

Available on crate feature parsing only.
Source§

impl Parse for ItemMacro

Available on crate feature parsing only.
Source§

impl Parse for ItemMod

Available on crate feature parsing only.
Source§

impl Parse for ItemStatic

Available on crate feature parsing only.
Source§

impl Parse for ItemStruct

Available on crate feature parsing only.
Source§

impl Parse for ItemTrait

Available on crate feature parsing only.
Source§

impl Parse for ItemTraitAlias

Available on crate feature parsing only.
Source§

impl Parse for ItemType

Available on crate feature parsing only.
Source§

impl Parse for ItemUnion

Available on crate feature parsing only.
Source§

impl Parse for ItemUse

Available on crate feature parsing only.
Source§

impl Parse for Label

Available on crate feature parsing only.
Source§

impl Parse for Lifetime

Available on crate feature parsing only.
Source§

impl Parse for LifetimeParam

Available on crate feature parsing only.
Source§

impl Parse for LitBool

Available on crate feature parsing only.
Source§

impl Parse for LitByte

Available on crate feature parsing only.
Source§

impl Parse for LitByteStr

Available on crate feature parsing only.
Source§

impl Parse for LitCStr

Available on crate feature parsing only.
Source§

impl Parse for LitChar

Available on crate feature parsing only.
Source§

impl Parse for LitFloat

Available on crate feature parsing only.
Source§

impl Parse for LitInt

Available on crate feature parsing only.
Source§

impl Parse for LitStr

Available on crate feature parsing only.
Source§

impl Parse for syn::Macro

Available on crate feature parsing only.
Source§

impl Parse for MetaList

Available on crate feature parsing only.
Source§

impl Parse for MetaNameValue

Available on crate feature parsing only.
Source§

impl Parse for ParenthesizedGenericArguments

Available on crate feature parsing only.
Source§

impl Parse for PatType

Available on crate feature parsing only.
Source§

impl Parse for Path

Available on crate feature parsing only.
Source§

impl Parse for PathSegment

Available on crate feature parsing only.
Source§

impl Parse for PreciseCapture

Available on crate feature parsing only.
Source§

impl Parse for Receiver

Available on crate feature parsing only.
Source§

impl Parse for Signature

Available on crate feature parsing only.
Source§

impl Parse for TraitBound

Available on crate feature parsing only.
Source§

impl Parse for TraitItemConst

Available on crate feature parsing only.
Source§

impl Parse for TraitItemFn

Available on crate feature parsing only.
Source§

impl Parse for TraitItemMacro

Available on crate feature parsing only.
Source§

impl Parse for TraitItemType

Available on crate feature parsing only.
Source§

impl Parse for TypeArray

Available on crate feature parsing only.
Source§

impl Parse for TypeBareFn

Available on crate feature parsing only.
Source§

impl Parse for TypeGroup

Available on crate feature parsing only.
Source§

impl Parse for TypeImplTrait

Available on crate feature parsing only.
Source§

impl Parse for TypeInfer

Available on crate feature parsing only.
Source§

impl Parse for TypeMacro

Available on crate feature parsing only.
Source§

impl Parse for TypeNever

Available on crate feature parsing only.
Source§

impl Parse for TypeParam

Available on crate feature parsing only.
Source§

impl Parse for TypeParen

Available on crate feature parsing only.
Source§

impl Parse for TypePath

Available on crate feature parsing only.
Source§

impl Parse for TypePtr

Available on crate feature parsing only.
Source§

impl Parse for TypeReference

Available on crate feature parsing only.
Source§

impl Parse for TypeSlice

Available on crate feature parsing only.
Source§

impl Parse for TypeTraitObject

Available on crate feature parsing only.
Source§

impl Parse for TypeTuple

Available on crate feature parsing only.
Source§

impl Parse for Variant

Available on crate feature parsing only.
Source§

impl Parse for WhereClause

Available on crate feature parsing only.
Source§

impl Parse for Abstract

Available on crate feature parsing only.
Source§

impl Parse for And

Available on crate feature parsing only.
Source§

impl Parse for AndAnd

Available on crate feature parsing only.
Source§

impl Parse for AndEq

Available on crate feature parsing only.
Source§

impl Parse for As

Available on crate feature parsing only.
Source§

impl Parse for Async

Available on crate feature parsing only.
Source§

impl Parse for At

Available on crate feature parsing only.
Source§

impl Parse for Auto

Available on crate feature parsing only.
Source§

impl Parse for Await

Available on crate feature parsing only.
Source§

impl Parse for Become

Available on crate feature parsing only.
Source§

impl Parse for syn::token::Box

Available on crate feature parsing only.
Source§

impl Parse for Break

Available on crate feature parsing only.
Source§

impl Parse for Caret

Available on crate feature parsing only.
Source§

impl Parse for CaretEq

Available on crate feature parsing only.
Source§

impl Parse for Colon

Available on crate feature parsing only.
Source§

impl Parse for Comma

Available on crate feature parsing only.
Source§

impl Parse for Const

Available on crate feature parsing only.
Source§

impl Parse for Continue

Available on crate feature parsing only.
Source§

impl Parse for Crate

Available on crate feature parsing only.
Source§

impl Parse for Default

Available on crate feature parsing only.
Source§

impl Parse for Do

Available on crate feature parsing only.
Source§

impl Parse for Dollar

Available on crate feature parsing only.
Source§

impl Parse for Dot

Available on crate feature parsing only.
Source§

impl Parse for DotDot

Available on crate feature parsing only.
Source§

impl Parse for DotDotDot

Available on crate feature parsing only.
Source§

impl Parse for DotDotEq

Available on crate feature parsing only.
Source§

impl Parse for Dyn

Available on crate feature parsing only.
Source§

impl Parse for Else

Available on crate feature parsing only.
Source§

impl Parse for Enum

Available on crate feature parsing only.
Source§

impl Parse for Eq

Available on crate feature parsing only.
Source§

impl Parse for EqEq

Available on crate feature parsing only.
Source§

impl Parse for Extern

Available on crate feature parsing only.
Source§

impl Parse for FatArrow

Available on crate feature parsing only.
Source§

impl Parse for Final

Available on crate feature parsing only.
Source§

impl Parse for Fn

Available on crate feature parsing only.
Source§

impl Parse for For

Available on crate feature parsing only.
Source§

impl Parse for Ge

Available on crate feature parsing only.
Source§

impl Parse for Gt

Available on crate feature parsing only.
Source§

impl Parse for If

Available on crate feature parsing only.
Source§

impl Parse for Impl

Available on crate feature parsing only.
Source§

impl Parse for In

Available on crate feature parsing only.
Source§

impl Parse for LArrow

Available on crate feature parsing only.
Source§

impl Parse for Le

Available on crate feature parsing only.
Source§

impl Parse for Let

Available on crate feature parsing only.
Source§

impl Parse for Loop

Available on crate feature parsing only.
Source§

impl Parse for Lt

Available on crate feature parsing only.
Source§

impl Parse for syn::token::Macro

Available on crate feature parsing only.
Source§

impl Parse for Match

Available on crate feature parsing only.
Source§

impl Parse for Minus

Available on crate feature parsing only.
Source§

impl Parse for MinusEq

Available on crate feature parsing only.
Source§

impl Parse for Mod

Available on crate feature parsing only.
Source§

impl Parse for Move

Available on crate feature parsing only.
Source§

impl Parse for Mut

Available on crate feature parsing only.
Source§

impl Parse for Ne

Available on crate feature parsing only.
Source§

impl Parse for Not

Available on crate feature parsing only.
Source§

impl Parse for Or

Available on crate feature parsing only.
Source§

impl Parse for OrEq

Available on crate feature parsing only.
Source§

impl Parse for OrOr

Available on crate feature parsing only.
Source§

impl Parse for Override

Available on crate feature parsing only.
Source§

impl Parse for PathSep

Available on crate feature parsing only.
Source§

impl Parse for Percent

Available on crate feature parsing only.
Source§

impl Parse for PercentEq

Available on crate feature parsing only.
Source§

impl Parse for Plus

Available on crate feature parsing only.
Source§

impl Parse for PlusEq

Available on crate feature parsing only.
Source§

impl Parse for Pound

Available on crate feature parsing only.
Source§

impl Parse for Priv

Available on crate feature parsing only.
Source§

impl Parse for Pub

Available on crate feature parsing only.
Source§

impl Parse for Question

Available on crate feature parsing only.
Source§

impl Parse for RArrow

Available on crate feature parsing only.
Source§

impl Parse for Raw

Available on crate feature parsing only.
Source§

impl Parse for Ref

Available on crate feature parsing only.
Source§

impl Parse for Return

Available on crate feature parsing only.
Source§

impl Parse for SelfType

Available on crate feature parsing only.
Source§

impl Parse for SelfValue

Available on crate feature parsing only.
Source§

impl Parse for Semi

Available on crate feature parsing only.
Source§

impl Parse for Shl

Available on crate feature parsing only.
Source§

impl Parse for ShlEq

Available on crate feature parsing only.
Source§

impl Parse for Shr

Available on crate feature parsing only.
Source§

impl Parse for ShrEq

Available on crate feature parsing only.
Source§

impl Parse for Slash

Available on crate feature parsing only.
Source§

impl Parse for SlashEq

Available on crate feature parsing only.
Source§

impl Parse for Star

Available on crate feature parsing only.
Source§

impl Parse for StarEq

Available on crate feature parsing only.
Source§

impl Parse for Static

Available on crate feature parsing only.
Source§

impl Parse for Struct

Available on crate feature parsing only.
Source§

impl Parse for Super

Available on crate feature parsing only.
Source§

impl Parse for Tilde

Available on crate feature parsing only.
Source§

impl Parse for Trait

Available on crate feature parsing only.
Source§

impl Parse for Try

Available on crate feature parsing only.
Source§

impl Parse for syn::token::Type

Available on crate feature parsing only.
Source§

impl Parse for Typeof

Available on crate feature parsing only.
Source§

impl Parse for Underscore

Available on crate feature parsing only.
Source§

impl Parse for Union

Available on crate feature parsing only.
Source§

impl Parse for Unsafe

Available on crate feature parsing only.
Source§

impl Parse for Unsized

Available on crate feature parsing only.
Source§

impl Parse for Use

Available on crate feature parsing only.
Source§

impl Parse for Virtual

Available on crate feature parsing only.
Source§

impl Parse for Where

Available on crate feature parsing only.
Source§

impl Parse for While

Available on crate feature parsing only.
Source§

impl Parse for Yield

Available on crate feature parsing only.
Source§

impl Parse for Nothing

Available on crate feature parsing only.