#[non_exhaustive]pub enum MemoryKind {
LinearMemory,
GcHeap,
}Available on crate feature
runtime only.Expand description
The kind of memory that MemoryCreator is asked to create.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
LinearMemory
A standard WebAssembly linear memory (module or host).
GcHeap
The memory backing a store’s GC heap.
It differs from standard linear memory:
- It is created lazily, at most once per store: when a module that needs a GC heap is instantiated or when the first GC object is allocated. This might happen in the middle of execution of WebAssembly code.
- It grows as GC objects are allocated, independently of
memory.grow. - Its contents are Wasmtime’s internal representation of GC objects, not data of the guest program. They are only meaningful to the store that created the GC heap, so they should not be shared, persisted, copied to other memories, etc.
Trait Implementations§
Source§impl Clone for MemoryKind
impl Clone for MemoryKind
impl Copy for MemoryKind
Source§impl Debug for MemoryKind
impl Debug for MemoryKind
impl Eq for MemoryKind
Source§impl From<MemoryKind> for MemoryKind
impl From<MemoryKind> for MemoryKind
Source§fn from(value: MemoryKind) -> Self
fn from(value: MemoryKind) -> Self
Converts to this type from the input type.
Source§impl Hash for MemoryKind
impl Hash for MemoryKind
Source§impl PartialEq for MemoryKind
impl PartialEq for MemoryKind
impl StructuralPartialEq for MemoryKind
Auto Trait Implementations§
impl Freeze for MemoryKind
impl RefUnwindSafe for MemoryKind
impl Send for MemoryKind
impl Sync for MemoryKind
impl Unpin for MemoryKind
impl UnsafeUnpin for MemoryKind
impl UnwindSafe for MemoryKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more