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§
Sourcefn from_reader(reader: &mut BinaryReader<'a>) -> Result<Self>
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
impl<'a> FromReader<'a> for &'a str
fn from_reader(reader: &mut BinaryReader<'a>) -> Result<Self>
Source§impl<'a> FromReader<'a> for Option<ComponentValType>
Available on crate feature component-model
only.
impl<'a> FromReader<'a> for Option<ComponentValType>
Available on crate feature
component-model
only.fn from_reader(reader: &mut BinaryReader<'a>) -> Result<Self>
Source§impl<'a> FromReader<'a> for u32
impl<'a> FromReader<'a> for u32
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>,
impl<'a, T, U> FromReader<'a> for (T, U)where
T: FromReader<'a>,
U: FromReader<'a>,
fn from_reader(reader: &mut BinaryReader<'a>) -> Result<Self>
Implementors§
impl<'a> FromReader<'a> for AbstractHeapType
impl<'a> FromReader<'a> for CanonicalFunction
Available on crate feature
component-model
only.impl<'a> FromReader<'a> for CanonicalOption
Available on crate feature
component-model
only.impl<'a> FromReader<'a> for Catch
impl<'a> FromReader<'a> for ComdatSymbolKind
impl<'a> FromReader<'a> for ComponentAlias<'a>
Available on crate feature
component-model
only.impl<'a> FromReader<'a> for ComponentExternalKind
Available on crate feature
component-model
only.impl<'a> FromReader<'a> for ComponentFuncResult<'a>
Available on crate feature
component-model
only.impl<'a> FromReader<'a> for ComponentInstance<'a>
Available on crate feature
component-model
only.impl<'a> FromReader<'a> for ComponentType<'a>
Available on crate feature
component-model
only.impl<'a> FromReader<'a> for ComponentTypeDeclaration<'a>
Available on crate feature
component-model
only.impl<'a> FromReader<'a> for ComponentTypeRef
Available on crate feature
component-model
only.impl<'a> FromReader<'a> for ComponentValType
Available on crate feature
component-model
only.impl<'a> FromReader<'a> for CoreDumpValue
impl<'a> FromReader<'a> for CoreType<'a>
Available on crate feature
component-model
only.impl<'a> FromReader<'a> for ExternalKind
impl<'a> FromReader<'a> for Handle
impl<'a> FromReader<'a> for HeapType
impl<'a> FromReader<'a> for Instance<'a>
Available on crate feature
component-model
only.impl<'a> FromReader<'a> for InstanceTypeDeclaration<'a>
Available on crate feature
component-model
only.impl<'a> FromReader<'a> for InstantiationArgKind
Available on crate feature
component-model
only.impl<'a> FromReader<'a> for ModuleTypeDeclaration<'a>
Available on crate feature
component-model
only.impl<'a> FromReader<'a> for RelocationType
impl<'a> FromReader<'a> for StorageType
impl<'a> FromReader<'a> for SymbolInfo<'a>
impl<'a> FromReader<'a> for TypeBounds
Available on crate feature
component-model
only.impl<'a> FromReader<'a> for TypeRef
impl<'a> FromReader<'a> for ValType
impl<'a> FromReader<'a> for ArrayType
impl<'a> FromReader<'a> for BranchHint
impl<'a> FromReader<'a> for BranchHintFunction<'a>
impl<'a> FromReader<'a> for Comdat<'a>
impl<'a> FromReader<'a> for ComdatSymbol
impl<'a> FromReader<'a> for ComponentExport<'a>
Available on crate feature
component-model
only.impl<'a> FromReader<'a> for ComponentExportName<'a>
Available on crate feature
component-model
only.impl<'a> FromReader<'a> for ComponentImport<'a>
Available on crate feature
component-model
only.impl<'a> FromReader<'a> for ComponentImportName<'a>
Available on crate feature
component-model
only.impl<'a> FromReader<'a> for ComponentInstantiationArg<'a>
Available on crate feature
component-model
only.impl<'a> FromReader<'a> for ComponentStartFunction
Available on crate feature
component-model
only.impl<'a> FromReader<'a> for CompositeType
impl<'a> FromReader<'a> for ConstExpr<'a>
impl<'a> FromReader<'a> for ContType
impl<'a> FromReader<'a> for CoreDumpInstance
impl<'a> FromReader<'a> for CoreDumpStackFrame
impl<'a> FromReader<'a> for Data<'a>
impl<'a> FromReader<'a> for DefinedDataSymbol
impl<'a> FromReader<'a> for Element<'a>
impl<'a> FromReader<'a> for Export<'a>
impl<'a> FromReader<'a> for FieldType
impl<'a> FromReader<'a> for FuncType
impl<'a> FromReader<'a> for FunctionBody<'a>
impl<'a> FromReader<'a> for Global<'a>
impl<'a> FromReader<'a> for GlobalType
impl<'a> FromReader<'a> for Import<'a>
impl<'a> FromReader<'a> for IndirectNaming<'a>
impl<'a> FromReader<'a> for InitFunc
impl<'a> FromReader<'a> for InstantiationArg<'a>
Available on crate feature
component-model
only.impl<'a> FromReader<'a> for MemoryType
impl<'a> FromReader<'a> for Naming<'a>
impl<'a> FromReader<'a> for ProducersField<'a>
impl<'a> FromReader<'a> for ProducersFieldValue<'a>
impl<'a> FromReader<'a> for RecGroup
impl<'a> FromReader<'a> for RefType
impl<'a> FromReader<'a> for RelocationEntry
impl<'a> FromReader<'a> for ResumeTable
impl<'a> FromReader<'a> for Segment<'a>
impl<'a> FromReader<'a> for SegmentFlags
impl<'a> FromReader<'a> for StructType
impl<'a> FromReader<'a> for SubType
impl<'a> FromReader<'a> for SymbolFlags
impl<'a> FromReader<'a> for Table<'a>
impl<'a> FromReader<'a> for TableType
impl<'a> FromReader<'a> for TagType
impl<'a> FromReader<'a> for TryTable
impl<'a> FromReader<'a> for VariantCase<'a>
Available on crate feature
component-model
only.