Trait syn::parse::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>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Parse for TokenTree

source§

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

source§

impl Parse for Option<Abi>

source§

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

source§

impl Parse for Option<BoundLifetimes>

source§

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

source§

impl Parse for Option<Label>

source§

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

source§

impl Parse for Option<WhereClause>

source§

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

source§

impl Parse for Group

source§

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

source§

impl Parse for Literal

source§

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

source§

impl Parse for Punct

source§

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

source§

impl Parse for TokenStream

source§

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

source§

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

source§

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

source§

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

source§

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

Implementors§

source§

impl Parse for BinOp

source§

impl Parse for Expr

source§

impl Parse for FnArg

source§

impl Parse for ForeignItem

source§

impl Parse for GenericArgument

source§

impl Parse for GenericParam

source§

impl Parse for ImplItem

source§

impl Parse for Item

source§

impl Parse for Lit

source§

impl Parse for Member

source§

impl Parse for Meta

source§

impl Parse for RangeLimits

source§

impl Parse for ReturnType

source§

impl Parse for StaticMutability

source§

impl Parse for Stmt

source§

impl Parse for TraitBoundModifier

source§

impl Parse for TraitItem

source§

impl Parse for syn::Type

source§

impl Parse for TypeParamBound

source§

impl Parse for UnOp

source§

impl Parse for UseTree

source§

impl Parse for Visibility

source§

impl Parse for WherePredicate

source§

impl Parse for Abi

source§

impl Parse for AngleBracketedGenericArguments

source§

impl Parse for Arm

source§

impl Parse for BareFnArg

source§

impl Parse for Block

source§

impl Parse for BoundLifetimes

source§

impl Parse for ConstParam

source§

impl Parse for DeriveInput

source§

impl Parse for ExprArray

source§

impl Parse for ExprAssign

source§

impl Parse for ExprAsync

source§

impl Parse for ExprAwait

source§

impl Parse for ExprBinary

source§

impl Parse for ExprBlock

source§

impl Parse for ExprBreak

source§

impl Parse for ExprCall

source§

impl Parse for ExprCast

source§

impl Parse for ExprClosure

source§

impl Parse for ExprConst

source§

impl Parse for ExprContinue

source§

impl Parse for ExprField

source§

impl Parse for ExprForLoop

source§

impl Parse for ExprIf

source§

impl Parse for ExprIndex

source§

impl Parse for ExprInfer

source§

impl Parse for ExprLet

source§

impl Parse for ExprLit

source§

impl Parse for ExprLoop

source§

impl Parse for ExprMacro

source§

impl Parse for ExprMatch

source§

impl Parse for ExprMethodCall

source§

impl Parse for ExprParen

source§

impl Parse for ExprPath

source§

impl Parse for ExprRange

source§

impl Parse for ExprReference

source§

impl Parse for ExprRepeat

source§

impl Parse for ExprReturn

source§

impl Parse for ExprStruct

source§

impl Parse for ExprTry

source§

impl Parse for ExprTryBlock

source§

impl Parse for ExprTuple

source§

impl Parse for ExprUnary

source§

impl Parse for ExprUnsafe

source§

impl Parse for ExprWhile

source§

impl Parse for ExprYield

source§

impl Parse for FieldValue

source§

impl Parse for FieldsNamed

source§

impl Parse for FieldsUnnamed

source§

impl Parse for File

source§

impl Parse for ForeignItemFn

source§

impl Parse for ForeignItemMacro

source§

impl Parse for ForeignItemStatic

source§

impl Parse for ForeignItemType

source§

impl Parse for Generics

source§

impl Parse for Ident

source§

impl Parse for ImplItemConst

source§

impl Parse for ImplItemFn

source§

impl Parse for ImplItemMacro

source§

impl Parse for ImplItemType

source§

impl Parse for Index

source§

impl Parse for ItemConst

source§

impl Parse for ItemEnum

source§

impl Parse for ItemExternCrate

source§

impl Parse for ItemFn

source§

impl Parse for ItemForeignMod

source§

impl Parse for ItemImpl

source§

impl Parse for ItemMacro

source§

impl Parse for ItemMod

source§

impl Parse for ItemStatic

source§

impl Parse for ItemStruct

source§

impl Parse for ItemTrait

source§

impl Parse for ItemTraitAlias

source§

impl Parse for ItemType

source§

impl Parse for ItemUnion

source§

impl Parse for ItemUse

source§

impl Parse for Label

source§

impl Parse for Lifetime

source§

impl Parse for LifetimeParam

source§

impl Parse for LitBool

source§

impl Parse for LitByte

source§

impl Parse for LitByteStr

source§

impl Parse for LitCStr

source§

impl Parse for LitChar

source§

impl Parse for LitFloat

source§

impl Parse for LitInt

source§

impl Parse for LitStr

source§

impl Parse for syn::Macro

source§

impl Parse for MetaList

source§

impl Parse for MetaNameValue

source§

impl Parse for ParenthesizedGenericArguments

source§

impl Parse for PatType

source§

impl Parse for Path

source§

impl Parse for PathSegment

source§

impl Parse for Receiver

source§

impl Parse for Signature

source§

impl Parse for TraitBound

source§

impl Parse for TraitItemConst

source§

impl Parse for TraitItemFn

source§

impl Parse for TraitItemMacro

source§

impl Parse for TraitItemType

source§

impl Parse for TypeArray

source§

impl Parse for TypeBareFn

source§

impl Parse for TypeGroup

source§

impl Parse for TypeImplTrait

source§

impl Parse for TypeInfer

source§

impl Parse for TypeMacro

source§

impl Parse for TypeNever

source§

impl Parse for TypeParam

source§

impl Parse for TypeParen

source§

impl Parse for TypePath

source§

impl Parse for TypePtr

source§

impl Parse for TypeReference

source§

impl Parse for TypeSlice

source§

impl Parse for TypeTraitObject

source§

impl Parse for TypeTuple

source§

impl Parse for Variant

source§

impl Parse for WhereClause

source§

impl Parse for Abstract

source§

impl Parse for And

source§

impl Parse for AndAnd

source§

impl Parse for AndEq

source§

impl Parse for As

source§

impl Parse for Async

source§

impl Parse for At

source§

impl Parse for Auto

source§

impl Parse for Await

source§

impl Parse for Become

source§

impl Parse for syn::token::Box

source§

impl Parse for Break

source§

impl Parse for Caret

source§

impl Parse for CaretEq

source§

impl Parse for Colon

source§

impl Parse for Comma

source§

impl Parse for Const

source§

impl Parse for Continue

source§

impl Parse for Crate

source§

impl Parse for Default

source§

impl Parse for Do

source§

impl Parse for Dollar

source§

impl Parse for Dot

source§

impl Parse for DotDot

source§

impl Parse for DotDotDot

source§

impl Parse for DotDotEq

source§

impl Parse for Dyn

source§

impl Parse for Else

source§

impl Parse for Enum

source§

impl Parse for Eq

source§

impl Parse for EqEq

source§

impl Parse for Extern

source§

impl Parse for FatArrow

source§

impl Parse for Final

source§

impl Parse for Fn

source§

impl Parse for For

source§

impl Parse for Ge

source§

impl Parse for Gt

source§

impl Parse for If

source§

impl Parse for Impl

source§

impl Parse for In

source§

impl Parse for LArrow

source§

impl Parse for Le

source§

impl Parse for Let

source§

impl Parse for Loop

source§

impl Parse for Lt

source§

impl Parse for syn::token::Macro

source§

impl Parse for Match

source§

impl Parse for Minus

source§

impl Parse for MinusEq

source§

impl Parse for Mod

source§

impl Parse for Move

source§

impl Parse for Mut

source§

impl Parse for Ne

source§

impl Parse for Not

source§

impl Parse for Or

source§

impl Parse for OrEq

source§

impl Parse for OrOr

source§

impl Parse for Override

source§

impl Parse for PathSep

source§

impl Parse for Percent

source§

impl Parse for PercentEq

source§

impl Parse for Plus

source§

impl Parse for PlusEq

source§

impl Parse for Pound

source§

impl Parse for Priv

source§

impl Parse for Pub

source§

impl Parse for Question

source§

impl Parse for RArrow

source§

impl Parse for Ref

source§

impl Parse for Return

source§

impl Parse for SelfType

source§

impl Parse for SelfValue

source§

impl Parse for Semi

source§

impl Parse for Shl

source§

impl Parse for ShlEq

source§

impl Parse for Shr

source§

impl Parse for ShrEq

source§

impl Parse for Slash

source§

impl Parse for SlashEq

source§

impl Parse for Star

source§

impl Parse for StarEq

source§

impl Parse for Static

source§

impl Parse for Struct

source§

impl Parse for Super

source§

impl Parse for Tilde

source§

impl Parse for Trait

source§

impl Parse for Try

source§

impl Parse for syn::token::Type

source§

impl Parse for Typeof

source§

impl Parse for Underscore

source§

impl Parse for Union

source§

impl Parse for Unsafe

source§

impl Parse for Unsized

source§

impl Parse for Use

source§

impl Parse for Virtual

source§

impl Parse for Where

source§

impl Parse for While

source§

impl Parse for Yield

source§

impl Parse for Nothing