Trait wasmparser::WasmModuleResources [−][src]
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 TypeDef: WasmTypeDef
[src]
The function type used for validation.
type TableType: WasmTableType
[src]
The table type used for validation.
type MemoryType: WasmMemoryType
[src]
The memory type used for validation.
type GlobalType: WasmGlobalType
[src]
The global type used for validation.
Required methods
fn type_at(&self, at: u32) -> Option<&Self::TypeDef>
[src]
Returns the type at given index.
fn table_at(&self, at: u32) -> Option<&Self::TableType>
[src]
Returns the table at given index if any.
fn memory_at(&self, at: u32) -> Option<&Self::MemoryType>
[src]
Returns the linear memory at given index.
fn global_at(&self, at: u32) -> Option<&Self::GlobalType>
[src]
Returns the global variable at given index.
fn func_type_at(
&self,
at: u32
) -> Option<&<Self::TypeDef as WasmTypeDef>::FuncType>
[src]
&self,
at: u32
) -> Option<&<Self::TypeDef as WasmTypeDef>::FuncType>
Returns the function signature ID at given index.
fn element_type_at(&self, at: u32) -> Option<Type>
[src]
Returns the element type at the given index.
fn element_count(&self) -> u32
[src]
Returns the number of elements.
fn data_count(&self) -> u32
[src]
Returns the number of bytes in the Wasm data section.
fn is_function_referenced(&self, idx: u32) -> bool
[src]
Returns whether the function index is referenced in the module anywhere outside of the start/function sections.
Implementations on Foreign Types
impl<T: ?Sized> WasmModuleResources for &T where
T: WasmModuleResources,
[src]
T: WasmModuleResources,
type TypeDef = T::TypeDef
type TableType = T::TableType
type MemoryType = T::MemoryType
type GlobalType = T::GlobalType
fn type_at(&self, at: u32) -> Option<&Self::TypeDef>
[src]
fn table_at(&self, at: u32) -> Option<&Self::TableType>
[src]
fn memory_at(&self, at: u32) -> Option<&Self::MemoryType>
[src]
fn global_at(&self, at: u32) -> Option<&Self::GlobalType>
[src]
fn func_type_at(
&self,
at: u32
) -> Option<&<T::TypeDef as WasmTypeDef>::FuncType>
[src]
&self,
at: u32
) -> Option<&<T::TypeDef as WasmTypeDef>::FuncType>