pub enum CoreExtern {
Func(CoreFuncType),
Table {
element_type: CoreRefType,
initial: u64,
maximum: Option<u64>,
table64: bool,
shared: bool,
},
Memory {
memory64: bool,
shared: bool,
initial: u64,
maximum: Option<u64>,
page_size_log2: Option<u32>,
},
Global {
val_type: CoreType,
mutable: bool,
shared: bool,
},
Tag(CoreFuncType),
}Expand description
Represents a core extern imported or exported from a core module.
Variants§
Func(CoreFuncType)
The item is a function.
Table
The item is a table.
Fields
element_type: CoreRefTypeThe table’s element type.
table64: boolWhether or not this is a 64-bit table, 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.
Memory
The item is a memory.
Fields
memory64: boolWhether 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: u64Initial 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.
page_size_log2: Option<u32>The log base 2 of the memory’s custom page size.
Memory pages are, by default, 64KiB large (i.e. 216 or
65536).
The custom-page-sizes proposal allows changing it to other values.
Global
The item is a global.
Fields
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.
Tag(CoreFuncType)
The item is a tag.
Trait Implementations§
Source§impl Clone for CoreExtern
impl Clone for CoreExtern
Source§fn clone(&self) -> CoreExtern
fn clone(&self) -> CoreExtern
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more