[][src]Trait wasmparser::WasmModuleResources

pub trait WasmModuleResources {
    type FuncType: WasmFuncType;
    type TableType: WasmTableType;
    type MemoryType: WasmMemoryType;
    type GlobalType: WasmGlobalType;
    fn type_at(&self, at: u32) -> Option<&Self::FuncType>;
fn table_at(&self, at: u32) -> Option<&Self::TableType>;
fn memory_at(&self, at: u32) -> Option<&Self::MemoryType>;
fn global_at(&self, at: u32) -> Option<&Self::GlobalType>;
fn func_type_id_at(&self, at: u32) -> Option<u32>;
fn element_count(&self) -> u32;
fn data_count(&self) -> u32; }

Types that qualify as Wasm valiation database.

Note

The wasmparser crate provides a builtin validation framework but allows users of this crate to also feed the parsed Wasm into their own data structure while parsing and also validate at the same time without the need of an additional parsing or validation step or copying data around.

Associated Types

type FuncType: WasmFuncType

The function type used for validation.

type TableType: WasmTableType

The table type used for validation.

type MemoryType: WasmMemoryType

The memory type used for validation.

type GlobalType: WasmGlobalType

The global type used for validation.

Loading content...

Required methods

fn type_at(&self, at: u32) -> Option<&Self::FuncType>

Returns the type at given index.

fn table_at(&self, at: u32) -> Option<&Self::TableType>

Returns the table at given index if any.

fn memory_at(&self, at: u32) -> Option<&Self::MemoryType>

Returns the linear memory at given index.

fn global_at(&self, at: u32) -> Option<&Self::GlobalType>

Returns the global variable at given index.

fn func_type_id_at(&self, at: u32) -> Option<u32>

Returns the function signature ID at given index.

fn element_count(&self) -> u32

Returns the number of elements.

fn data_count(&self) -> u32

Returns the number of bytes in the Wasm data section.

Loading content...

Implementors

Loading content...