pub struct MemoryType(/* private fields */);
Expand description
An opaque reference to a memory type.
A MemoryType
is a descriptor of a struct layout in memory, with
types and proof-carrying-code facts optionally attached to the
fields.
Implementations§
Source§impl MemoryType
impl MemoryType
Sourcepub fn as_bits(self) -> u32
pub fn as_bits(self) -> u32
Return the raw bit encoding for this instance.
Warning: the raw bit encoding is opaque and has no
guaranteed correspondence to the entity’s index. It encodes the
entire state of this index value: either a valid index or an
invalid-index sentinel. The value returned by this method should
only be passed to from_bits
.
Sourcepub fn from_bits(x: u32) -> Self
pub fn from_bits(x: u32) -> Self
Create a new instance from the raw bit encoding.
Warning: the raw bit encoding is opaque and has no
guaranteed correspondence to the entity’s index. It encodes the
entire state of this index value: either a valid index or an
invalid-index sentinel. The value returned by this method should
only be given bits from as_bits
.
Source§impl MemoryType
impl MemoryType
Sourcepub fn with_number(n: u32) -> Option<Self>
pub fn with_number(n: u32) -> Option<Self>
Create a new memory type reference from its number.
This method is for use by the parser.
Trait Implementations§
Source§impl Clone for MemoryType
impl Clone for MemoryType
Source§fn clone(&self) -> MemoryType
fn clone(&self) -> MemoryType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MemoryType
impl Debug for MemoryType
Source§impl Display for MemoryType
impl Display for MemoryType
Source§impl EntityRef for MemoryType
impl EntityRef for MemoryType
Source§impl From<MemoryType> for AnyEntity
impl From<MemoryType> for AnyEntity
Source§fn from(r: MemoryType) -> Self
fn from(r: MemoryType) -> Self
Source§impl Hash for MemoryType
impl Hash for MemoryType
Source§impl Ord for MemoryType
impl Ord for MemoryType
Source§fn cmp(&self, other: &MemoryType) -> Ordering
fn cmp(&self, other: &MemoryType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for MemoryType
impl PartialEq for MemoryType
Source§impl PartialOrd for MemoryType
impl PartialOrd for MemoryType
Source§impl ReservedValue for MemoryType
impl ReservedValue for MemoryType
Source§fn reserved_value() -> MemoryType
fn reserved_value() -> MemoryType
Source§fn is_reserved_value(&self) -> bool
fn is_reserved_value(&self) -> bool
impl Copy for MemoryType
impl Eq for MemoryType
impl StructuralPartialEq for MemoryType
Auto Trait Implementations§
impl Freeze for MemoryType
impl RefUnwindSafe for MemoryType
impl Send for MemoryType
impl Sync for MemoryType
impl Unpin for MemoryType
impl UnwindSafe for MemoryType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.