Struct wasmparser_nostd::MemoryType
source · [−]pub struct MemoryType {
pub memory64: bool,
pub shared: bool,
pub initial: u64,
pub maximum: Option<u64>,
}
Expand description
Represents a memory’s type.
Fields
memory64: bool
Whether or not this is a 64-bit memory, using i64 as an index. If this is false it’s a 32-bit memory using i32 as an index.
This is part of the memory64 proposal in WebAssembly.
Whether or not this is a “shared” memory, indicating that it should be
send-able across threads and the maximum
field is always present for
valid types.
This is part of the threads proposal in WebAssembly.
initial: u64
Initial size of this memory, in wasm pages.
For 32-bit memories (when memory64
is false
) this is guaranteed to
be at most u32::MAX
for valid types.
maximum: Option<u64>
Optional maximum size of this memory, in wasm pages.
For 32-bit memories (when memory64
is false
) this is guaranteed to
be at most u32::MAX
for valid types. This field is always present for
valid wasm memories when shared
is true
.
Implementations
sourceimpl MemoryType
impl MemoryType
sourcepub fn index_type(&self) -> ValType
pub fn index_type(&self) -> ValType
Gets the index type for the memory.
Trait Implementations
sourceimpl Clone for MemoryType
impl Clone for MemoryType
sourcefn clone(&self) -> MemoryType
fn clone(&self) -> MemoryType
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more