Trait wasm::core::reader::WasmReadable
source · pub trait WasmReadable: Sized {
// Required methods
fn read(wasm: &mut WasmReader<'_>) -> Result<Self>;
fn read_unvalidated(wasm: &mut WasmReader<'_>) -> Self;
}
Required Methods§
sourcefn read(wasm: &mut WasmReader<'_>) -> Result<Self>
fn read(wasm: &mut WasmReader<'_>) -> Result<Self>
Reads a new Self
from given WasmReader
.
Note that if this function returns Err(_)
, the WasmReader
may still have been advanced,
which may lead to unexpected behaviour.
To avoid this consider using the WasmReader::handle_transaction
method to wrap this function call.
sourcefn read_unvalidated(wasm: &mut WasmReader<'_>) -> Self
fn read_unvalidated(wasm: &mut WasmReader<'_>) -> Self
Object Safety§
This trait is not object safe.