Enum cranelift_codegen::ir::MemoryTypeData
source · pub enum MemoryTypeData {
Struct {
size: u64,
fields: Vec<MemoryTypeField>,
},
Memory {
size: u64,
},
DynamicMemory {
size: u64,
gv: GlobalValue,
},
Empty,
}
Expand description
Data defining a memory type.
A memory type corresponds to a layout of data in memory. It may have a statically-known or dynamically-known size.
Variants§
Struct
An aggregate consisting of certain fields at certain offsets.
Fields must be sorted by offset, must be within the struct’s overall size, and must not overlap. These conditions are checked by the CLIF verifier.
Fields
§
fields: Vec<MemoryTypeField>
Fields in this type. Sorted by offset.
Memory
A statically-sized untyped blob of memory.
DynamicMemory
A dynamically-sized untyped blob of memory, with bound given by a global value plus some static amount.
Empty
A type with no size.
Implementations§
source§impl MemoryTypeData
impl MemoryTypeData
sourcepub fn static_size(&self) -> Option<u64>
pub fn static_size(&self) -> Option<u64>
Provide the static size of this type, if known.
(The size may not be known for dynamically-sized arrays or memories, when those memtype kinds are added.)
Trait Implementations§
source§impl Clone for MemoryTypeData
impl Clone for MemoryTypeData
source§fn clone(&self) -> MemoryTypeData
fn clone(&self) -> MemoryTypeData
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 moresource§impl Default for MemoryTypeData
impl Default for MemoryTypeData
source§impl Display for MemoryTypeData
impl Display for MemoryTypeData
source§impl Hash for MemoryTypeData
impl Hash for MemoryTypeData
source§impl PartialEq for MemoryTypeData
impl PartialEq for MemoryTypeData
source§fn eq(&self, other: &MemoryTypeData) -> bool
fn eq(&self, other: &MemoryTypeData) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for MemoryTypeData
Auto Trait Implementations§
impl Freeze for MemoryTypeData
impl RefUnwindSafe for MemoryTypeData
impl Send for MemoryTypeData
impl Sync for MemoryTypeData
impl Unpin for MemoryTypeData
impl UnwindSafe for MemoryTypeData
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