pub trait FromReader<'a>: Sized {
    // Required method
    fn from_reader(
        reader: &mut BinaryReader<'a>
    ) -> Result<Self, BinaryReaderError>;
}
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, BinaryReaderError>

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

Implementations on Foreign Types§

source§

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

source§

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

source§

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

Implementors§

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

impl<'a> FromReader<'a> for Type

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

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 InstantiationArg<'a>

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 TableType

source§

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

source§

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