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)
Available on crate feature
validate
only.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
Available on crate feature validate
only.
pub fn is_canonical(&self) -> bool
validate
only.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>
Available on crate feature validate
only.
pub fn as_core_type_id(&self) -> Option<CoreTypeId>
validate
only.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.6.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 Ord for UnpackedIndex
impl Ord for UnpackedIndex
source§fn cmp(&self, other: &UnpackedIndex) -> Ordering
fn cmp(&self, other: &UnpackedIndex) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for UnpackedIndex
impl PartialEq for UnpackedIndex
source§impl PartialOrd for UnpackedIndex
impl PartialOrd for UnpackedIndex
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<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> 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
Compare self to
key
and return true
if they are equal.