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
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)