Enum mun_memory::mapping::Action
source · pub enum Action {
ArrayAlloc,
ArrayFromValue {
element_action: Box<Action>,
old_offset: usize,
},
ArrayMap {
element_action: Box<Action>,
old_offset: usize,
},
Cast {
old_ty: Type,
old_offset: usize,
},
Copy {
old_offset: usize,
size: usize,
},
ElementFromArray {
element_action: Box<Action>,
old_offset: usize,
},
StructAlloc,
StructMapFromGc {
old_ty: Type,
old_offset: usize,
},
StructMapFromValue {
old_ty: Type,
old_offset: usize,
},
StructMapInPlace {
old_ty: Type,
old_offset: usize,
},
ZeroInitialize,
}
Expand description
The Action
to take when mapping memory from A to B.
Variants§
ArrayAlloc
Allocate a new array.
ArrayFromValue
Allocate a new array and initialize it with a single value.
ArrayMap
Allocate a new array and map values from an old array.
Cast
Cast a primitive type.
Copy
Copy bytes.
ElementFromArray
Replace an array with its element type, copying its first element - if any. Otherwise, zero initialize the element.
StructAlloc
Allocate a new struct and ensure zero-initalization.
StructMapFromGc
Allocate a new struct and map from a heap-allocated struct.
StructMapFromValue
Allocate a new struct and map from a value struct.
StructMapInPlace
Map a value struct in-place.
ZeroInitialize
Ensure the memory is zero-initialized.