Struct wasmtime::MemoryType
source · [−]pub struct MemoryType { /* private fields */ }
Expand description
A descriptor for a WebAssembly memory type.
Memories are described in units of pages (64KB) and represent contiguous chunks of addressable memory.
Implementations
sourceimpl MemoryType
impl MemoryType
sourcepub fn new(minimum: u32, maximum: Option<u32>) -> MemoryType
pub fn new(minimum: u32, maximum: Option<u32>) -> MemoryType
Creates a new descriptor for a 32-bit WebAssembly memory given the specified limits of the memory.
The minimum
and maximum
values here are specified in units of
WebAssembly pages, which are 64k.
sourcepub fn new64(minimum: u64, maximum: Option<u64>) -> MemoryType
pub fn new64(minimum: u64, maximum: Option<u64>) -> MemoryType
Creates a new descriptor for a 64-bit WebAssembly memory given the specified limits of the memory.
The minimum
and maximum
values here are specified in units of
WebAssembly pages, which are 64k.
Note that 64-bit memories are part of the memory64 proposal for WebAssembly which is not standardized yet.
Creates a new descriptor for shared WebAssembly memory given the specified limits of the memory.
The minimum
and maximum
values here are specified in units of
WebAssembly pages, which are 64k.
Note that shared memories are part of the threads proposal for WebAssembly which is not standardized yet.
sourcepub fn is_64(&self) -> bool
pub fn is_64(&self) -> bool
Returns whether this is a 64-bit memory or not.
Note that 64-bit memories are part of the memory64 proposal for WebAssembly which is not standardized yet.
Returns whether this is a shared memory or not.
Note that shared memories are part of the threads proposal for WebAssembly which is not standardized yet.
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 moresourceimpl Debug for MemoryType
impl Debug for MemoryType
sourceimpl From<MemoryType> for ExternType
impl From<MemoryType> for ExternType
sourcefn from(ty: MemoryType) -> ExternType
fn from(ty: MemoryType) -> ExternType
sourceimpl Hash for MemoryType
impl Hash for MemoryType
sourceimpl PartialEq<MemoryType> for MemoryType
impl PartialEq<MemoryType> for MemoryType
sourcefn eq(&self, other: &MemoryType) -> bool
fn eq(&self, other: &MemoryType) -> bool
impl Eq for MemoryType
impl StructuralEq for MemoryType
impl StructuralPartialEq for MemoryType
Auto Trait Implementations
impl RefUnwindSafe for MemoryType
impl Send for MemoryType
impl Sync for MemoryType
impl Unpin for MemoryType
impl UnwindSafe for MemoryType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.