pub struct RefType {
pub nullable: bool,
pub heap_type: HeapType,
}Expand description
A reference type.
Reference types include function references, external references, and the GC proposal types (anyref, eqref, i31ref, etc.).
Fields§
§nullable: boolWhether this reference type is nullable.
heap_type: HeapTypeThe heap type that this reference points to.
Implementations§
Source§impl RefType
impl RefType
Sourcepub const NULLEXTERNREF: RefType
pub const NULLEXTERNREF: RefType
Alias for the nullexternref type in WebAssembly.
Sourcepub const NULLFUNCREF: RefType
pub const NULLFUNCREF: RefType
Alias for the nullfuncref type in WebAssembly.
Sourcepub fn is_nullable(&self) -> bool
pub fn is_nullable(&self) -> bool
Returns whether this reference type is nullable.
Sourcepub fn to_wasmencoder_ref_type(self) -> RefType
pub fn to_wasmencoder_ref_type(self) -> RefType
Convert to wasm_encoder RefType.
Trait Implementations§
Source§impl Ord for RefType
impl Ord for RefType
Source§impl PartialOrd for RefType
impl PartialOrd for RefType
impl Copy for RefType
impl Eq for RefType
impl StructuralPartialEq for RefType
Auto Trait Implementations§
impl Freeze for RefType
impl RefUnwindSafe for RefType
impl Send for RefType
impl Sync for RefType
impl Unpin for RefType
impl UnwindSafe for RefType
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.