pub enum UnpackedIndex {
Module(u32),
RecGroup(u32),
Id(CoreTypeId),
}
Expand description
The uncompressed form of a PackedIndex
.
Can be used for match
statements.
Variants§
Module(u32)
An index into a Wasm module’s types space.
RecGroup(u32)
An index into the containing recursion group’s elements.
Id(CoreTypeId)
A type identifier.
Implementations§
source§impl UnpackedIndex
impl UnpackedIndex
sourcepub fn pack(&self) -> Option<PackedIndex>
pub fn pack(&self) -> Option<PackedIndex>
Compress this index into its packed form.
Returns None
if an index is beyond implementation limits.
sourcepub fn is_canonical(&self) -> bool
pub fn is_canonical(&self) -> bool
Is this index in canonical form?
sourcepub fn as_module_index(&self) -> Option<u32>
pub fn as_module_index(&self) -> Option<u32>
Get the underlying index into a module’s types space, if any.
sourcepub fn as_rec_group_index(&self) -> Option<u32>
pub fn as_rec_group_index(&self) -> Option<u32>
Get the underlying index into the containing recursion group, if any.
sourcepub fn as_core_type_id(&self) -> Option<CoreTypeId>
pub fn as_core_type_id(&self) -> Option<CoreTypeId>
Get the underlying CoreTypeId
, if any.
Trait Implementations§
source§impl Clone for UnpackedIndex
impl Clone for UnpackedIndex
source§fn clone(&self) -> UnpackedIndex
fn clone(&self) -> UnpackedIndex
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 Debug for UnpackedIndex
impl Debug for UnpackedIndex
source§impl Display for UnpackedIndex
impl Display for UnpackedIndex
source§impl Hash for UnpackedIndex
impl Hash for UnpackedIndex
source§impl PartialEq for UnpackedIndex
impl PartialEq for UnpackedIndex
source§fn eq(&self, other: &UnpackedIndex) -> bool
fn eq(&self, other: &UnpackedIndex) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for UnpackedIndex
impl Eq for UnpackedIndex
impl StructuralPartialEq for UnpackedIndex
Auto Trait Implementations§
impl Freeze for UnpackedIndex
impl RefUnwindSafe for UnpackedIndex
impl Send for UnpackedIndex
impl Sync for UnpackedIndex
impl Unpin for UnpackedIndex
impl UnwindSafe for UnpackedIndex
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<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.