pub struct Memory {
pub shared: bool,
pub memory64: bool,
pub initial: u64,
pub maximum: Option<u64>,
pub page_size_log2: Option<u32>,
pub import: Option<ImportId>,
pub data_segments: HashSet<Id<Data>, BuildIdHasher>,
pub name: Option<String>,
/* private fields */
}Expand description
A memory in the wasm.
Fields§
Whether or not this is a “shared” memory
This is part of the threads proposal.
memory64: boolWhether or not this is a 64-bit memory.
This is part of the memory64 proposal.
initial: u64Initial size of this memory, in wasm pages.
maximum: Option<u64>Optional maximum size of this memory, in wasm pages.
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.
import: Option<ImportId>Whether or not this memory is imported, and if so from where.
data_segments: HashSet<Id<Data>, BuildIdHasher>Active data segments that will be used to initialize this memory.
name: Option<String>The name of this memory, used for debugging purposes in the name
custom section.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Memory
impl RefUnwindSafe for Memory
impl Send for Memory
impl Sync for Memory
impl Unpin for Memory
impl UnwindSafe for Memory
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more