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.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 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§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.