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
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> 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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoAnyhow for T
impl<T> IntoAnyhow for T
Source§fn into_anyhow(self) -> Error
fn into_anyhow(self) -> Error
Converts
self
into an anyhow::Error
.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more