wasmparser

Trait FromReader

Source
pub trait FromReader<'a>: Sized {
    // Required method
    fn from_reader(reader: &mut BinaryReader<'a>) -> Result<Self>;
}
Expand description

A trait implemented for items that can be decoded directly from a BinaryReader, or that which can be parsed from the WebAssembly binary format.

Note that this is also accessible as a BinaryReader::read method.

Required Methods§

Source

fn from_reader(reader: &mut BinaryReader<'a>) -> Result<Self>

Attempts to read Self from the provided binary reader, returning an error if it is unable to do so.

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<'a> FromReader<'a> for &'a str

Source§

fn from_reader(reader: &mut BinaryReader<'a>) -> Result<Self>

Source§

impl<'a> FromReader<'a> for Option<ComponentValType>

Available on crate feature component-model only.
Source§

fn from_reader(reader: &mut BinaryReader<'a>) -> Result<Self>

Source§

impl<'a> FromReader<'a> for u32

Source§

fn from_reader(reader: &mut BinaryReader<'a>) -> Result<Self>

Source§

impl<'a, T, U> FromReader<'a> for (T, U)
where T: FromReader<'a>, U: FromReader<'a>,

Source§

fn from_reader(reader: &mut BinaryReader<'a>) -> Result<Self>

Implementors§

Source§

impl<'a> FromReader<'a> for AbstractHeapType

Source§

impl<'a> FromReader<'a> for CanonicalFunction

Available on crate feature component-model only.
Source§

impl<'a> FromReader<'a> for CanonicalOption

Available on crate feature component-model only.
Source§

impl<'a> FromReader<'a> for Catch

Source§

impl<'a> FromReader<'a> for ComdatSymbolKind

Source§

impl<'a> FromReader<'a> for ComponentAlias<'a>

Available on crate feature component-model only.
Source§

impl<'a> FromReader<'a> for ComponentExternalKind

Available on crate feature component-model only.
Source§

impl<'a> FromReader<'a> for ComponentFuncResult<'a>

Available on crate feature component-model only.
Source§

impl<'a> FromReader<'a> for ComponentInstance<'a>

Available on crate feature component-model only.
Source§

impl<'a> FromReader<'a> for ComponentType<'a>

Available on crate feature component-model only.
Source§

impl<'a> FromReader<'a> for ComponentTypeDeclaration<'a>

Available on crate feature component-model only.
Source§

impl<'a> FromReader<'a> for ComponentTypeRef

Available on crate feature component-model only.
Source§

impl<'a> FromReader<'a> for ComponentValType

Available on crate feature component-model only.
Source§

impl<'a> FromReader<'a> for CoreDumpValue

Source§

impl<'a> FromReader<'a> for CoreType<'a>

Available on crate feature component-model only.
Source§

impl<'a> FromReader<'a> for ExternalKind

Source§

impl<'a> FromReader<'a> for Handle

Source§

impl<'a> FromReader<'a> for HeapType

Source§

impl<'a> FromReader<'a> for Instance<'a>

Available on crate feature component-model only.
Source§

impl<'a> FromReader<'a> for InstanceTypeDeclaration<'a>

Available on crate feature component-model only.
Source§

impl<'a> FromReader<'a> for InstantiationArgKind

Available on crate feature component-model only.
Source§

impl<'a> FromReader<'a> for ModuleTypeDeclaration<'a>

Available on crate feature component-model only.
Source§

impl<'a> FromReader<'a> for RelocationType

Source§

impl<'a> FromReader<'a> for StorageType

Source§

impl<'a> FromReader<'a> for SymbolInfo<'a>

Source§

impl<'a> FromReader<'a> for TypeBounds

Available on crate feature component-model only.
Source§

impl<'a> FromReader<'a> for TypeRef

Source§

impl<'a> FromReader<'a> for ValType

Source§

impl<'a> FromReader<'a> for ArrayType

Source§

impl<'a> FromReader<'a> for BranchHint

Source§

impl<'a> FromReader<'a> for BranchHintFunction<'a>

Source§

impl<'a> FromReader<'a> for Comdat<'a>

Source§

impl<'a> FromReader<'a> for ComdatSymbol

Source§

impl<'a> FromReader<'a> for ComponentExport<'a>

Available on crate feature component-model only.
Source§

impl<'a> FromReader<'a> for ComponentExportName<'a>

Available on crate feature component-model only.
Source§

impl<'a> FromReader<'a> for ComponentImport<'a>

Available on crate feature component-model only.
Source§

impl<'a> FromReader<'a> for ComponentImportName<'a>

Available on crate feature component-model only.
Source§

impl<'a> FromReader<'a> for ComponentInstantiationArg<'a>

Available on crate feature component-model only.
Source§

impl<'a> FromReader<'a> for ComponentStartFunction

Available on crate feature component-model only.
Source§

impl<'a> FromReader<'a> for CompositeType

Source§

impl<'a> FromReader<'a> for ConstExpr<'a>

Source§

impl<'a> FromReader<'a> for ContType

Source§

impl<'a> FromReader<'a> for CoreDumpInstance

Source§

impl<'a> FromReader<'a> for CoreDumpStackFrame

Source§

impl<'a> FromReader<'a> for Data<'a>

Source§

impl<'a> FromReader<'a> for DefinedDataSymbol

Source§

impl<'a> FromReader<'a> for Element<'a>

Source§

impl<'a> FromReader<'a> for Export<'a>

Source§

impl<'a> FromReader<'a> for FieldType

Source§

impl<'a> FromReader<'a> for FuncType

Source§

impl<'a> FromReader<'a> for FunctionBody<'a>

Source§

impl<'a> FromReader<'a> for Global<'a>

Source§

impl<'a> FromReader<'a> for GlobalType

Source§

impl<'a> FromReader<'a> for Import<'a>

Source§

impl<'a> FromReader<'a> for IndirectNaming<'a>

Source§

impl<'a> FromReader<'a> for InitFunc

Source§

impl<'a> FromReader<'a> for InstantiationArg<'a>

Available on crate feature component-model only.
Source§

impl<'a> FromReader<'a> for MemoryType

Source§

impl<'a> FromReader<'a> for Naming<'a>

Source§

impl<'a> FromReader<'a> for ProducersField<'a>

Source§

impl<'a> FromReader<'a> for ProducersFieldValue<'a>

Source§

impl<'a> FromReader<'a> for RecGroup

Source§

impl<'a> FromReader<'a> for RefType

Source§

impl<'a> FromReader<'a> for RelocationEntry

Source§

impl<'a> FromReader<'a> for ResumeTable

Source§

impl<'a> FromReader<'a> for Segment<'a>

Source§

impl<'a> FromReader<'a> for SegmentFlags

Source§

impl<'a> FromReader<'a> for StructType

Source§

impl<'a> FromReader<'a> for SubType

Source§

impl<'a> FromReader<'a> for SymbolFlags

Source§

impl<'a> FromReader<'a> for Table<'a>

Source§

impl<'a> FromReader<'a> for TableType

Source§

impl<'a> FromReader<'a> for TagType

Source§

impl<'a> FromReader<'a> for TryTable

Source§

impl<'a> FromReader<'a> for VariantCase<'a>

Available on crate feature component-model only.