Enum mun_abi::StructMemoryKind
source · #[repr(u8)]
pub enum StructMemoryKind {
Gc,
Value,
}
Expand description
Represents the kind of memory management a struct uses.
Variants§
Gc
A garbage collected struct is allocated on the heap and uses reference semantics when passed around.
Value
A value struct is allocated on the stack and uses value semantics when passed around.
NOTE: When a value struct is used in an external API, a wrapper is created that pins the value on the heap. The heap-allocated value needs to be manually deallocated!
Trait Implementations§
source§impl Clone for StructMemoryKind
impl Clone for StructMemoryKind
source§fn clone(&self) -> StructMemoryKind
fn clone(&self) -> StructMemoryKind
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more