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
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl 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
Performs the conversion.
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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &MemoryType) -> bool
fn ne(&self, other: &MemoryType) -> bool
This method tests for !=
.
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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more