Expand description
A reference to another item in a wasm module.
This type is used for items referring to other items (such as call $foo
referencing function $foo
). References can be either an index (u32) or an
Id
in the textual format.
The emission phase of a module will ensure that Index::Id
is never used
and switch them all to Index::Num
.
Variants
Num(u32, Span)
A numerical index that this references. The index space this is
referencing is implicit based on where this Index
is stored.
Id(Id<'a>)
A human-readable identifier this references. Like Num
, the namespace
this references is based on where this is stored.
Implementations
Trait Implementations
sourceimpl Peek for Index<'_>
impl Peek for Index<'_>
impl<'a> Copy for Index<'a>
impl Eq for Index<'_>
Auto Trait Implementations
impl<'a> RefUnwindSafe for Index<'a>
impl<'a> Send for Index<'a>
impl<'a> Sync for Index<'a>
impl<'a> Unpin for Index<'a>
impl<'a> UnwindSafe for Index<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more