pub struct RuntimeDataIndex(/* private fields */);Expand description
Index into data segments needed at runtime by a module.
This does not directly correspond to either active or passive data segments
in the wasm spec. Instead this is a concept purely for Wasmtime and
organizing memory initialization within the
ModuleTranslation::finalize_memory_init function, for example.
Passive data segments at runtime all have a corresponding
RuntimeDataIndex, but active data segments maybe coalesced or mutated if
they’re statically evaluated.
Implementations§
Source§impl RuntimeDataIndex
impl RuntimeDataIndex
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.
Trait Implementations§
Source§impl Clone for RuntimeDataIndex
impl Clone for RuntimeDataIndex
Source§fn clone(&self) -> RuntimeDataIndex
fn clone(&self) -> RuntimeDataIndex
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RuntimeDataIndex
impl Debug for RuntimeDataIndex
Source§impl<'de> Deserialize<'de> for RuntimeDataIndex
impl<'de> Deserialize<'de> for RuntimeDataIndex
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl EntityRef for RuntimeDataIndex
impl EntityRef for RuntimeDataIndex
Source§impl Hash for RuntimeDataIndex
impl Hash for RuntimeDataIndex
Source§impl Ord for RuntimeDataIndex
impl Ord for RuntimeDataIndex
Source§fn cmp(&self, other: &RuntimeDataIndex) -> Ordering
fn cmp(&self, other: &RuntimeDataIndex) -> 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 RuntimeDataIndex
impl PartialEq for RuntimeDataIndex
Source§impl PartialOrd for RuntimeDataIndex
impl PartialOrd for RuntimeDataIndex
Source§impl ReservedValue for RuntimeDataIndex
impl ReservedValue for RuntimeDataIndex
Source§fn reserved_value() -> RuntimeDataIndex
fn reserved_value() -> RuntimeDataIndex
Source§fn is_reserved_value(&self) -> bool
fn is_reserved_value(&self) -> bool
Source§impl Serialize for RuntimeDataIndex
impl Serialize for RuntimeDataIndex
Source§impl TryClone for RuntimeDataIndex
impl TryClone for RuntimeDataIndex
Source§fn try_clone(&self) -> Result<Self, OutOfMemory>
fn try_clone(&self) -> Result<Self, OutOfMemory>
self, returning an error if any allocation fails
during cloning.§fn clone_panic_on_oom(&self) -> Self
fn clone_panic_on_oom(&self) -> Self
self, panicking on allocation failure.impl Copy for RuntimeDataIndex
impl Eq for RuntimeDataIndex
impl StructuralPartialEq for RuntimeDataIndex
Auto Trait Implementations§
impl Freeze for RuntimeDataIndex
impl RefUnwindSafe for RuntimeDataIndex
impl Send for RuntimeDataIndex
impl Sync for RuntimeDataIndex
impl Unpin for RuntimeDataIndex
impl UnsafeUnpin for RuntimeDataIndex
impl UnwindSafe for RuntimeDataIndex
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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> SparseMapValue<T> for Twhere
T: EntityRef,
impl<T> SparseMapValue<T> for Twhere
T: EntityRef,
§impl<T> TryToOwned for Twhere
T: TryClone,
impl<T> TryToOwned for Twhere
T: TryClone,
§fn try_to_owned(&self) -> Result<<T as TryToOwned>::Owned, OutOfMemory>
fn try_to_owned(&self) -> Result<<T as TryToOwned>::Owned, OutOfMemory>
self.