wast::parser

Trait Parse

Source
pub trait Parse<'a>: Sized {
    // Required method
    fn parse(parser: Parser<'a>) -> Result<Self>;
}
Expand description

A trait for parsing a fragment of syntax in a recursive descent fashion.

The Parse trait is main abstraction you’ll be working with when defining custom parser or custom syntax for your WebAssembly text format (or when using the official format items). Almost all items in the core module implement the Parse trait, and you’ll commonly use this with:

  • The top-level parse function to parse an entire input.
  • The intermediate Parser::parse function to parse an item out of an input stream and then parse remaining items.

Implementation of Parse take a Parser as input and will mutate the parser as they parse syntax. Once a token is consume it cannot be “un-consumed”. Utilities such as Parser::peek and Parser::lookahead1 can be used to determine what to parse next.

§When to parse ( and )?

Conventionally types are not responsible for parsing their own ( and ) tokens which surround the type. For example WebAssembly imports look like:

(import "foo" "bar" (func (type 0)))

but the Import type parser looks like:

impl<'a> Parse<'a> for Import<'a> {
    fn parse(parser: Parser<'a>) -> Result<Self> {
        parser.parse::<kw::import>()?;
        // ...
    }
}

It is assumed here that the ( and ) tokens which surround an import statement in the WebAssembly text format are parsed by the parent item parsing Import.

Note that this is just a convention, so it’s not necessarily required for all types. It’s recommended that your types stick to this convention where possible to avoid nested calls to Parser::parens or accidentally trying to parse too many parenthesis.

§Examples

Let’s say you want to define your own WebAssembly text format which only contains imports and functions. You also require all imports to be listed before all functions. An example Parse implementation might look like:

use wast::core::{Import, Func};
use wast::kw;
use wast::parser::{Parser, Parse, Result};

// Fields of a WebAssembly which only allow imports and functions, and all
// imports must come before all the functions
struct OnlyImportsAndFunctions<'a> {
    imports: Vec<Import<'a>>,
    functions: Vec<Func<'a>>,
}

impl<'a> Parse<'a> for OnlyImportsAndFunctions<'a> {
    fn parse(parser: Parser<'a>) -> Result<Self> {
        // While the second token is `import` (the first is `(`, so we care
        // about the second) we parse an `ast::ModuleImport` inside of
        // parentheses. The `parens` function here ensures that what we
        // parse inside of it is surrounded by `(` and `)`.
        let mut imports = Vec::new();
        while parser.peek2::<kw::import>()? {
            let import = parser.parens(|p| p.parse())?;
            imports.push(import);
        }

        // Afterwards we assume everything else is a function. Note that
        // `parse` here is a generic function and type inference figures out
        // that we're parsing functions here and imports above.
        let mut functions = Vec::new();
        while !parser.is_empty() {
            let func = parser.parens(|p| p.parse())?;
            functions.push(func);
        }

        Ok(OnlyImportsAndFunctions { imports, functions })
    }
}

Required Methods§

Source

fn parse(parser: Parser<'a>) -> Result<Self>

Attempts to parse Self from parser, returning an error if it could not be parsed.

This method will mutate the state of parser after attempting to parse an instance of Self. If an error happens then it is likely fatal and there is no guarantee of how many tokens have been consumed from parser.

As recommended in the documentation of Parse, implementations of this function should not start out by parsing ( and ) tokens, but rather parents calling recursive parsers should parse the ( and ) tokens for their child item that’s being parsed.

§Errors

This function will return an error if Self could not be parsed. Note that creating an Error is not exactly a cheap operation, so Error is typically fatal and propagated all the way back to the top parse call site.

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 String

Source§

fn parse(parser: Parser<'_>) -> Result<Self>

Source§

impl<'a> Parse<'a> for &'a str

Source§

fn parse(parser: Parser<'a>) -> Result<Self>

Source§

impl<'a> Parse<'a> for &'a [u8]

Source§

fn parse(parser: Parser<'a>) -> Result<Self>

Source§

impl<'a> Parse<'a> for (i8, Span)

Source§

fn parse(parser: Parser<'a>) -> Result<Self>

Source§

impl<'a> Parse<'a> for (i16, Span)

Source§

fn parse(parser: Parser<'a>) -> Result<Self>

Source§

impl<'a> Parse<'a> for (i32, Span)

Source§

fn parse(parser: Parser<'a>) -> Result<Self>

Source§

impl<'a> Parse<'a> for (i64, Span)

Source§

fn parse(parser: Parser<'a>) -> Result<Self>

Source§

impl<'a> Parse<'a> for (u8, Span)

Source§

fn parse(parser: Parser<'a>) -> Result<Self>

Source§

impl<'a> Parse<'a> for (u16, Span)

Source§

fn parse(parser: Parser<'a>) -> Result<Self>

Source§

impl<'a> Parse<'a> for (u32, Span)

Source§

fn parse(parser: Parser<'a>) -> Result<Self>

Source§

impl<'a> Parse<'a> for (u64, Span)

Source§

fn parse(parser: Parser<'a>) -> Result<Self>

Source§

impl<'a> Parse<'a> for Option<NameAnnotation<'a>>

Source§

fn parse(parser: Parser<'a>) -> Result<Self>

Source§

impl<'a> Parse<'a> for i8

Source§

fn parse(parser: Parser<'a>) -> Result<Self>

Source§

impl<'a> Parse<'a> for i16

Source§

fn parse(parser: Parser<'a>) -> Result<Self>

Source§

impl<'a> Parse<'a> for i32

Source§

fn parse(parser: Parser<'a>) -> Result<Self>

Source§

impl<'a> Parse<'a> for i64

Source§

fn parse(parser: Parser<'a>) -> Result<Self>

Source§

impl<'a> Parse<'a> for u8

Source§

fn parse(parser: Parser<'a>) -> Result<Self>

Source§

impl<'a> Parse<'a> for u16

Source§

fn parse(parser: Parser<'a>) -> Result<Self>

Source§

impl<'a> Parse<'a> for u32

Source§

fn parse(parser: Parser<'a>) -> Result<Self>

Source§

impl<'a> Parse<'a> for u64

Source§

fn parse(parser: Parser<'a>) -> Result<Self>

Source§

impl<'a> Parse<'a> for Vec<CanonOpt<'a>>

Available on crate feature component-model only.
Source§

fn parse(parser: Parser<'a>) -> Result<Self>

Source§

impl<'a> Parse<'a> for Vec<ComponentTypeDecl<'a>>

Available on crate feature component-model only.
Source§

fn parse(parser: Parser<'a>) -> Result<Self>

Source§

impl<'a> Parse<'a> for Vec<InstanceTypeDecl<'a>>

Available on crate feature component-model only.
Source§

fn parse(parser: Parser<'a>) -> Result<Self>

Source§

impl<'a> Parse<'a> for Vec<ModuleTypeDecl<'a>>

Available on crate feature component-model only.
Source§

fn parse(parser: Parser<'a>) -> Result<Self>

Source§

impl<'a> Parse<'a> for Vec<ComponentExport<'a>>

Available on crate feature component-model only.
Source§

fn parse(parser: Parser<'a>) -> Result<Self>

Source§

impl<'a> Parse<'a> for Vec<CoreInstanceExport<'a>>

Available on crate feature component-model only.
Source§

fn parse(parser: Parser<'a>) -> Result<Self>

Source§

impl<'a> Parse<'a> for Vec<CoreInstantiationArg<'a>>

Available on crate feature component-model only.
Source§

fn parse(parser: Parser<'a>) -> Result<Self>

Source§

impl<'a> Parse<'a> for Vec<InstantiationArg<'a>>

Available on crate feature component-model only.
Source§

fn parse(parser: Parser<'a>) -> Result<Self>

Source§

impl<'a, T> Parse<'a> for Box<T>
where T: Parse<'a>,

Source§

fn parse(parser: Parser<'a>) -> Result<Self>

Source§

impl<'a, T: Peek + Parse<'a>> Parse<'a> for Option<T>

Source§

fn parse(parser: Parser<'a>) -> Result<Option<T>>

Implementors§

Source§

impl<'a> Parse<'a> for CanonOpt<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for ComponentExportAliasKind

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for ComponentExportKind<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for ComponentField<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for ComponentOuterAliasKind

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for ComponentTypeDecl<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for ComponentValType<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for CoreFuncKind<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for CoreInstanceKind<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for CoreInstantiationArgKind<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for CoreTypeDef<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for FuncKind<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for InstanceKind<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for InstanceTypeDecl<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for InstantiationArgKind<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for ModuleTypeDecl<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for PrimitiveValType

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for Refinement<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for TypeBounds<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for wast::component::TypeDef<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for WastVal<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for AbstractHeapType

Source§

impl<'a> Parse<'a> for wast::core::Custom<'a>

Source§

impl<'a> Parse<'a> for CustomPlace

Source§

impl<'a> Parse<'a> for CustomPlaceAnchor

Source§

impl<'a> Parse<'a> for DataVal<'a>

Source§

impl<'a> Parse<'a> for ExportKind

Source§

impl<'a> Parse<'a> for HeapType<'a>

Source§

impl<'a> Parse<'a> for InnerTypeKind<'a>

Source§

impl<'a> Parse<'a> for Instruction<'a>

Source§

impl<'a> Parse<'a> for ModuleField<'a>

Source§

impl<'a> Parse<'a> for Ordering

Source§

impl<'a> Parse<'a> for StorageType<'a>

Source§

impl<'a> Parse<'a> for TagType<'a>

Source§

impl<'a> Parse<'a> for V128Const

Source§

impl<'a> Parse<'a> for V128Pattern

Source§

impl<'a> Parse<'a> for ValType<'a>

Source§

impl<'a> Parse<'a> for WastArgCore<'a>

Source§

impl<'a> Parse<'a> for WastRetCore<'a>

Source§

impl<'a> Parse<'a> for QuoteWat<'a>

Source§

impl<'a> Parse<'a> for WastArg<'a>

Source§

impl<'a> Parse<'a> for WastDirective<'a>

Source§

impl<'a> Parse<'a> for WastExecute<'a>

Source§

impl<'a> Parse<'a> for WastRet<'a>

Source§

impl<'a> Parse<'a> for Wat<'a>

Source§

impl<'a> Parse<'a> for Index<'a>

Source§

impl<'a> Parse<'a> for custom

Source§

impl<'a> Parse<'a> for metadata_code_branch_hint

Source§

impl<'a> Parse<'a> for name

Source§

impl<'a> Parse<'a> for producers

Source§

impl<'a> Parse<'a> for Alias<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for CanonLift<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for CanonLower<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for CanonResourceDrop<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for CanonResourceNew<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for CanonResourceRep<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for CanonThreadHwConcurrency

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for CanonThreadSpawn<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for CanonicalFunc<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for Component<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for ComponentExport<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for ComponentExportType<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for ComponentExternName<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for ComponentFunctionParam<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for ComponentFunctionResult<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for ComponentFunctionType<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for ComponentImport<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for ComponentType<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for ComponentValTypeUse<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for CoreFunc<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for CoreInstance<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for CoreInstanceExport<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for CoreInstantiationArg<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for CoreModule<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for CoreType<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for wast::component::Custom<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for Enum<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for Flags<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for wast::component::Func<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for InlineComponentValType<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for wast::component::InlineExport<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for wast::component::InlineImport<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for Instance<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for InstanceType<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for InstantiationArg<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for wast::component::ItemSig<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for ItemSigNoName<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for List<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for ModuleType<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for NestedComponent<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for OptionType<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for Record<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for RecordField<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for ResourceType<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for ResultType<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for Start<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for Tuple<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for Variant<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for VariantCase<'a>

Available on crate feature component-model only.
Source§

impl<'a> Parse<'a> for ArrayCopy<'a>

Source§

impl<'a> Parse<'a> for ArrayFill<'a>

Source§

impl<'a> Parse<'a> for ArrayInit<'a>

Source§

impl<'a> Parse<'a> for ArrayNewData<'a>

Source§

impl<'a> Parse<'a> for ArrayNewElem<'a>

Source§

impl<'a> Parse<'a> for ArrayNewFixed<'a>

Source§

impl<'a> Parse<'a> for ArrayType<'a>

Source§

impl<'a> Parse<'a> for BlockType<'a>

Source§

impl<'a> Parse<'a> for BrOnCast<'a>

Source§

impl<'a> Parse<'a> for BrOnCastFail<'a>

Source§

impl<'a> Parse<'a> for BrTableIndices<'a>

Source§

impl<'a> Parse<'a> for CallIndirect<'a>

Source§

impl<'a> Parse<'a> for ContBind<'a>

Source§

impl<'a> Parse<'a> for ContType<'a>

Source§

impl<'a> Parse<'a> for Data<'a>

Source§

impl<'a> Parse<'a> for Dylink0<'a>

Source§

impl<'a> Parse<'a> for Elem<'a>

Source§

impl<'a> Parse<'a> for Export<'a>

Source§

impl<'a> Parse<'a> for ExportType<'a>

Source§

impl<'a> Parse<'a> for Expression<'a>

Source§

impl<'a> Parse<'a> for wast::core::Func<'a>

Source§

impl<'a> Parse<'a> for FunctionType<'a>

Source§

impl<'a> Parse<'a> for FunctionTypeNoNames<'a>

Source§

impl<'a> Parse<'a> for Global<'a>

Source§

impl<'a> Parse<'a> for GlobalType<'a>

Source§

impl<'a> Parse<'a> for I8x16Shuffle

Source§

impl<'a> Parse<'a> for Import<'a>

Source§

impl<'a> Parse<'a> for wast::core::InlineExport<'a>

Source§

impl<'a> Parse<'a> for wast::core::InlineImport<'a>

Source§

impl<'a> Parse<'a> for wast::core::ItemSig<'a>

Source§

impl<'a> Parse<'a> for LaneArg

Source§

impl<'a> Parse<'a> for Limits

Source§

impl<'a> Parse<'a> for LocalParser<'a>

Source§

impl<'a> Parse<'a> for Memory<'a>

Source§

impl<'a> Parse<'a> for MemoryArg<'a>

Source§

impl<'a> Parse<'a> for MemoryCopy<'a>

Source§

impl<'a> Parse<'a> for MemoryInit<'a>

Source§

impl<'a> Parse<'a> for MemoryType

Source§

impl<'a> Parse<'a> for Module<'a>

Source§

impl<'a> Parse<'a> for Producers<'a>

Source§

impl<'a> Parse<'a> for RawCustomSection<'a>

Source§

impl<'a> Parse<'a> for Rec<'a>

Source§

impl<'a> Parse<'a> for RefCast<'a>

Source§

impl<'a> Parse<'a> for RefTest<'a>

Source§

impl<'a> Parse<'a> for RefType<'a>

Source§

impl<'a> Parse<'a> for Resume<'a>

Source§

impl<'a> Parse<'a> for ResumeTable<'a>

Source§

impl<'a> Parse<'a> for ResumeThrow<'a>

Source§

impl<'a> Parse<'a> for SelectTypes<'a>

Source§

impl<'a> Parse<'a> for StructAccess<'a>

Source§

impl<'a> Parse<'a> for StructType<'a>

Source§

impl<'a> Parse<'a> for Switch<'a>

Source§

impl<'a> Parse<'a> for Table<'a>

Source§

impl<'a> Parse<'a> for TableArg<'a>

Source§

impl<'a> Parse<'a> for TableCopy<'a>

Source§

impl<'a> Parse<'a> for TableInit<'a>

Source§

impl<'a> Parse<'a> for TableType<'a>

Source§

impl<'a> Parse<'a> for Tag<'a>

Source§

impl<'a> Parse<'a> for TryTable<'a>

Source§

impl<'a> Parse<'a> for Type<'a>

Source§

impl<'a> Parse<'a> for wast::core::TypeDef<'a>

Source§

impl<'a> Parse<'a> for acq_rel

Source§

impl<'a> Parse<'a> for after

Source§

impl<'a> Parse<'a> for alias

Source§

impl<'a> Parse<'a> for any

Source§

impl<'a> Parse<'a> for anyref

Source§

impl<'a> Parse<'a> for arg

Source§

impl<'a> Parse<'a> for array

Source§

impl<'a> Parse<'a> for arrayref

Source§

impl<'a> Parse<'a> for assert_exception

Source§

impl<'a> Parse<'a> for assert_exhaustion

Source§

impl<'a> Parse<'a> for assert_invalid

Source§

impl<'a> Parse<'a> for assert_malformed

Source§

impl<'a> Parse<'a> for assert_return

Source§

impl<'a> Parse<'a> for assert_suspension

Source§

impl<'a> Parse<'a> for assert_trap

Source§

impl<'a> Parse<'a> for assert_unlinkable

Source§

impl<'a> Parse<'a> for before

Source§

impl<'a> Parse<'a> for binary

Source§

impl<'a> Parse<'a> for block

Source§

impl<'a> Parse<'a> for bool_

Source§

impl<'a> Parse<'a> for borrow

Source§

impl<'a> Parse<'a> for canon

Source§

impl<'a> Parse<'a> for case

Source§

impl<'a> Parse<'a> for catch

Source§

impl<'a> Parse<'a> for catch_all

Source§

impl<'a> Parse<'a> for catch_all_ref

Source§

impl<'a> Parse<'a> for catch_ref

Source§

impl<'a> Parse<'a> for char

Source§

impl<'a> Parse<'a> for code

Source§

impl<'a> Parse<'a> for component

Source§

impl<'a> Parse<'a> for cont

Source§

impl<'a> Parse<'a> for contref

Source§

impl<'a> Parse<'a> for core

Source§

impl<'a> Parse<'a> for data

Source§

impl<'a> Parse<'a> for declare

Source§

impl<'a> Parse<'a> for definition

Source§

impl<'a> Parse<'a> for delegate

Source§

impl<'a> Parse<'a> for do

Source§

impl<'a> Parse<'a> for dtor

Source§

impl<'a> Parse<'a> for elem

Source§

impl<'a> Parse<'a> for else

Source§

impl<'a> Parse<'a> for end

Source§

impl<'a> Parse<'a> for enum_

Source§

impl<'a> Parse<'a> for eq

Source§

impl<'a> Parse<'a> for eqref

Source§

impl<'a> Parse<'a> for error

Source§

impl<'a> Parse<'a> for exn

Source§

impl<'a> Parse<'a> for exnref

Source§

impl<'a> Parse<'a> for export

Source§

impl<'a> Parse<'a> for export_info

Source§

impl<'a> Parse<'a> for extern

Source§

impl<'a> Parse<'a> for externref

Source§

impl<'a> Parse<'a> for f32

Source§

impl<'a> Parse<'a> for f32x4

Source§

impl<'a> Parse<'a> for f64

Source§

impl<'a> Parse<'a> for f64x2

Source§

impl<'a> Parse<'a> for false_

Source§

impl<'a> Parse<'a> for field

Source§

impl<'a> Parse<'a> for final

Source§

impl<'a> Parse<'a> for first

Source§

impl<'a> Parse<'a> for flags

Source§

impl<'a> Parse<'a> for float32

Source§

impl<'a> Parse<'a> for float64

Source§

impl<'a> Parse<'a> for func

Source§

impl<'a> Parse<'a> for funcref

Source§

impl<'a> Parse<'a> for get

Source§

impl<'a> Parse<'a> for global

Source§

impl<'a> Parse<'a> for i8

Source§

impl<'a> Parse<'a> for i8x16

Source§

impl<'a> Parse<'a> for i16

Source§

impl<'a> Parse<'a> for i16x8

Source§

impl<'a> Parse<'a> for i31

Source§

impl<'a> Parse<'a> for i31ref

Source§

impl<'a> Parse<'a> for i32

Source§

impl<'a> Parse<'a> for i32x4

Source§

impl<'a> Parse<'a> for i64

Source§

impl<'a> Parse<'a> for i64x2

Source§

impl<'a> Parse<'a> for if

Source§

impl<'a> Parse<'a> for import

Source§

impl<'a> Parse<'a> for import_info

Source§

impl<'a> Parse<'a> for instance

Source§

impl<'a> Parse<'a> for instantiate

Source§

impl<'a> Parse<'a> for interface

Source§

impl<'a> Parse<'a> for invoke

Source§

impl<'a> Parse<'a> for item

Source§

impl<'a> Parse<'a> for language

Source§

impl<'a> Parse<'a> for last

Source§

impl<'a> Parse<'a> for lift

Source§

impl<'a> Parse<'a> for list

Source§

impl<'a> Parse<'a> for local

Source§

impl<'a> Parse<'a> for loop

Source§

impl<'a> Parse<'a> for lower

Source§

impl<'a> Parse<'a> for mem_info

Source§

impl<'a> Parse<'a> for memory

Source§

impl<'a> Parse<'a> for module

Source§

impl<'a> Parse<'a> for modulecode

Source§

impl<'a> Parse<'a> for mut

Source§

impl<'a> Parse<'a> for nan_arithmetic

Source§

impl<'a> Parse<'a> for nan_canonical

Source§

impl<'a> Parse<'a> for needed

Source§

impl<'a> Parse<'a> for nocont

Source§

impl<'a> Parse<'a> for noexn

Source§

impl<'a> Parse<'a> for noextern

Source§

impl<'a> Parse<'a> for nofunc

Source§

impl<'a> Parse<'a> for none

Source§

impl<'a> Parse<'a> for null

Source§

impl<'a> Parse<'a> for nullcontref

Source§

impl<'a> Parse<'a> for nullexnref

Source§

impl<'a> Parse<'a> for nullexternref

Source§

impl<'a> Parse<'a> for nullfuncref

Source§

impl<'a> Parse<'a> for nullref

Source§

impl<'a> Parse<'a> for offset

Source§

impl<'a> Parse<'a> for on

Source§

impl<'a> Parse<'a> for option

Source§

impl<'a> Parse<'a> for outer

Source§

impl<'a> Parse<'a> for own

Source§

impl<'a> Parse<'a> for pagesize

Source§

impl<'a> Parse<'a> for param

Source§

impl<'a> Parse<'a> for parent

Source§

impl<'a> Parse<'a> for passive

Source§

impl<'a> Parse<'a> for post_return

Source§

impl<'a> Parse<'a> for processed_by

Source§

impl<'a> Parse<'a> for quote

Source§

impl<'a> Parse<'a> for realloc

Source§

impl<'a> Parse<'a> for rec

Source§

impl<'a> Parse<'a> for record

Source§

impl<'a> Parse<'a> for ref

Source§

impl<'a> Parse<'a> for ref_func

Source§

impl<'a> Parse<'a> for ref_null

Source§

impl<'a> Parse<'a> for refines

Source§

impl<'a> Parse<'a> for register

Source§

impl<'a> Parse<'a> for rep

Source§

impl<'a> Parse<'a> for resource

Source§

impl<'a> Parse<'a> for resource_drop

Source§

impl<'a> Parse<'a> for resource_new

Source§

impl<'a> Parse<'a> for resource_rep

Source§

impl<'a> Parse<'a> for result

Source§

impl<'a> Parse<'a> for s8

Source§

impl<'a> Parse<'a> for s16

Source§

impl<'a> Parse<'a> for s32

Source§

impl<'a> Parse<'a> for s64

Source§

impl<'a> Parse<'a> for sdk

Source§

impl<'a> Parse<'a> for seq_cst

Source§

impl<'a> Parse<'a> for shared

Source§

impl<'a> Parse<'a> for start

Source§

impl<'a> Parse<'a> for string

Source§

impl<'a> Parse<'a> for string_latin1_utf16

Source§

impl<'a> Parse<'a> for string_utf8

Source§

impl<'a> Parse<'a> for string_utf16

Source§

impl<'a> Parse<'a> for struct

Source§

impl<'a> Parse<'a> for structref

Source§

impl<'a> Parse<'a> for sub

Source§

impl<'a> Parse<'a> for switch

Source§

impl<'a> Parse<'a> for table

Source§

impl<'a> Parse<'a> for tag

Source§

impl<'a> Parse<'a> for then

Source§

impl<'a> Parse<'a> for thread

Source§

impl<'a> Parse<'a> for thread_hw_concurrency

Source§

impl<'a> Parse<'a> for thread_spawn

Source§

impl<'a> Parse<'a> for true_

Source§

impl<'a> Parse<'a> for try

Source§

impl<'a> Parse<'a> for tuple

Source§

impl<'a> Parse<'a> for type

Source§

impl<'a> Parse<'a> for u8

Source§

impl<'a> Parse<'a> for u16

Source§

impl<'a> Parse<'a> for u32

Source§

impl<'a> Parse<'a> for u64

Source§

impl<'a> Parse<'a> for v128

Source§

impl<'a> Parse<'a> for value

Source§

impl<'a> Parse<'a> for variant

Source§

impl<'a> Parse<'a> for wait

Source§

impl<'a> Parse<'a> for with

Source§

impl<'a> Parse<'a> for Wast<'a>

Source§

impl<'a> Parse<'a> for WastInvoke<'a>

Source§

impl<'a> Parse<'a> for WastThread<'a>

Source§

impl<'a> Parse<'a> for F32

Source§

impl<'a> Parse<'a> for F64

Source§

impl<'a> Parse<'a> for Id<'a>

Source§

impl<'a> Parse<'a> for NameAnnotation<'a>

Source§

impl<'a, K> Parse<'a> for IndexOrCoreRef<'a, K>
where K: Parse<'a> + Default,

Available on crate feature component-model only.
Source§

impl<'a, K> Parse<'a> for IndexOrRef<'a, K>
where K: Parse<'a> + Default,

Available on crate feature component-model only.
Source§

impl<'a, K: Parse<'a>> Parse<'a> for CoreItemRef<'a, K>

Available on crate feature component-model only.
Source§

impl<'a, K: Parse<'a>> Parse<'a> for wast::component::ItemRef<'a, K>

Available on crate feature component-model only.
Source§

impl<'a, K: Parse<'a>> Parse<'a> for wast::token::ItemRef<'a, K>

Source§

impl<'a, T> Parse<'a> for NanPattern<T>
where T: Parse<'a>,

Source§

impl<'a, T> Parse<'a> for Ordered<T>
where T: Parse<'a>,

Source§

impl<'a, T: Parse<'a>> Parse<'a> for ComponentTypeUse<'a, T>

Available on crate feature component-model only.
Source§

impl<'a, T: Parse<'a>> Parse<'a> for CoreTypeUse<'a, T>

Available on crate feature component-model only.
Source§

impl<'a, T: Peek + Parse<'a>> Parse<'a> for TypeUse<'a, T>

Source§

impl<'a, const CORE: bool> Parse<'a> for InlineExportAlias<'a, CORE>

Available on crate feature component-model only.