Trait cranelift_wasm::wasmparser::FromReader
source · 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§
sourcefn from_reader(reader: &mut BinaryReader<'a>) -> Result<Self, BinaryReaderError>
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.
Object Safety§
This trait is not object safe.