pub enum ExportItem<T> {
Index(T),
Name(String),
}
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(String)
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: Clone> Clone for ExportItem<T>
impl<T: Clone> Clone for ExportItem<T>
Source§fn clone(&self) -> ExportItem<T>
fn clone(&self) -> ExportItem<T>
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<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
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: Eq> Eq for ExportItem<T>
impl<T> StructuralPartialEq for ExportItem<T>
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> 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
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
)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
Compare self to
key
and return true
if they are equal.