pub enum ExportItem<T> {
Index(T),
Name(TryString),
}Expand description
An index at which to find an item within a runtime instance.
Variants§
Index(T)
An exact index that the target can be found at.
This is used where possible to avoid name lookups at runtime during the instantiation process. This can only be used on instances where the module was statically known at compile time, however.
Name(TryString)
An item which is identified by a name, so at runtime we need to perform a name lookup to determine the index that the item is located at.
This is used for instantiations of imported modules, for example, since the precise shape of the module is not known.
Trait Implementations§
Source§impl<T: Debug> Debug for ExportItem<T>
impl<T: Debug> Debug for ExportItem<T>
Source§impl<'de, T> Deserialize<'de> for ExportItem<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for ExportItem<T>where
T: Deserialize<'de>,
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>,
Deserialize this value from the given Serde deserializer. Read more
impl<T: Eq> Eq for ExportItem<T>
Source§impl<T: Hash> Hash for ExportItem<T>
impl<T: Hash> Hash for ExportItem<T>
Source§impl<T: PartialEq> PartialEq for ExportItem<T>
impl<T: PartialEq> PartialEq for ExportItem<T>
Source§impl<T> Serialize for ExportItem<T>where
T: Serialize,
impl<T> Serialize for ExportItem<T>where
T: Serialize,
impl<T: PartialEq> StructuralPartialEq for ExportItem<T>
Source§impl<T: TryClone> TryClone for ExportItem<T>
impl<T: TryClone> TryClone for ExportItem<T>
Source§fn try_clone(&self) -> Result<Self, OutOfMemory>
fn try_clone(&self) -> Result<Self, OutOfMemory>
Attempt to clone
self, returning an error if any allocation fails
during cloning.§fn clone_panic_on_oom(&self) -> Self
fn clone_panic_on_oom(&self) -> Self
Clone
self, panicking on allocation failure.Auto Trait Implementations§
impl<T> Freeze for ExportItem<T>where
T: Freeze,
impl<T> RefUnwindSafe for ExportItem<T>where
T: RefUnwindSafe,
impl<T> Send for ExportItem<T>where
T: Send,
impl<T> Sync for ExportItem<T>where
T: Sync,
impl<T> Unpin for ExportItem<T>where
T: Unpin,
impl<T> UnsafeUnpin for ExportItem<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for ExportItem<T>where
T: UnwindSafe,
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
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
Checks if this value is equivalent to the given key. Read more
§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>
Try to allocate an owned version of
self.