pub struct TypeResourceTableIndex(/* private fields */);Expand description
Index pointing to a resource table within a component.
This is a Wasmtime-specific type index which isn’t part of the component model per-se (or at least not the binary format). This index represents a pointer to a table of runtime information tracking state for resources within a component. Tables are generated per-resource-per-component meaning that if the exact same resource is imported into 4 subcomponents then that’s 5 tables: one for the defining component and one for each subcomponent.
All resource-related intrinsics operate on table-local indices which
indicate which table the intrinsic is modifying. Each resource table has
an origin resource type (defined by ResourceIndex) along with a
component instance that it’s recorded for.
Implementations§
Source§impl TypeResourceTableIndex
 
impl TypeResourceTableIndex
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 TypeResourceTableIndex
 
impl Clone for TypeResourceTableIndex
Source§fn clone(&self) -> TypeResourceTableIndex
 
fn clone(&self) -> TypeResourceTableIndex
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TypeResourceTableIndex
 
impl Debug for TypeResourceTableIndex
Source§impl<'de> Deserialize<'de> for TypeResourceTableIndex
 
impl<'de> Deserialize<'de> for TypeResourceTableIndex
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 TypeResourceTableIndex
 
impl EntityRef for TypeResourceTableIndex
Source§impl Hash for TypeResourceTableIndex
 
impl Hash for TypeResourceTableIndex
Source§impl Index<TypeResourceTableIndex> for ComponentTypes
 
impl Index<TypeResourceTableIndex> for ComponentTypes
Source§type Output = TypeResourceTable
 
type Output = TypeResourceTable
Source§fn index(&self, idx: TypeResourceTableIndex) -> &TypeResourceTable
 
fn index(&self, idx: TypeResourceTableIndex) -> &TypeResourceTable
container[index]) operation. Read moreSource§impl Index<TypeResourceTableIndex> for ComponentTypesBuilder
Available on crate feature compile only. 
impl Index<TypeResourceTableIndex> for ComponentTypesBuilder
compile only.Source§type Output = TypeResourceTable
 
type Output = TypeResourceTable
Source§fn index(&self, idx: TypeResourceTableIndex) -> &TypeResourceTable
 
fn index(&self, idx: TypeResourceTableIndex) -> &TypeResourceTable
container[index]) operation. Read moreSource§impl Ord for TypeResourceTableIndex
 
impl Ord for TypeResourceTableIndex
Source§fn cmp(&self, other: &TypeResourceTableIndex) -> Ordering
 
fn cmp(&self, other: &TypeResourceTableIndex) -> 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 TypeResourceTableIndex
 
impl PartialEq for TypeResourceTableIndex
Source§impl PartialOrd for TypeResourceTableIndex
 
impl PartialOrd for TypeResourceTableIndex
Source§impl ReservedValue for TypeResourceTableIndex
 
impl ReservedValue for TypeResourceTableIndex
Source§fn reserved_value() -> TypeResourceTableIndex
 
fn reserved_value() -> TypeResourceTableIndex
Source§fn is_reserved_value(&self) -> bool
 
fn is_reserved_value(&self) -> bool
Source§impl Serialize for TypeResourceTableIndex
 
impl Serialize for TypeResourceTableIndex
impl Copy for TypeResourceTableIndex
impl Eq for TypeResourceTableIndex
impl StructuralPartialEq for TypeResourceTableIndex
Auto Trait Implementations§
impl Freeze for TypeResourceTableIndex
impl RefUnwindSafe for TypeResourceTableIndex
impl Send for TypeResourceTableIndex
impl Sync for TypeResourceTableIndex
impl Unpin for TypeResourceTableIndex
impl UnwindSafe for TypeResourceTableIndex
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.