pub struct RefType(/* private fields */);Expand description
A WebAssembly reference type.
Packed as:
[nullable:1 concrete:1 payload:30]For concrete types, payload is a module type index before instantiation
and a canonical store type address at runtime.
Otherwise, it is an AbstractHeapType.
See https://webassembly.github.io/spec/core/syntax/types.html#syntax-reftype
Implementations§
Source§impl RefType
impl RefType
pub const FUNCREF: Self
pub const EXTERNREF: Self
pub const EXNREF: Self
pub const fn new_abstract(nullable: bool, heap_type: AbstractHeapType) -> Self
pub const fn new_concrete(nullable: bool, type_index: u32) -> Self
pub const fn is_nullable(self) -> bool
pub const fn is_concrete(self) -> bool
pub const fn type_index(self) -> Option<u32>
pub const fn abstract_heap_type(self) -> Option<AbstractHeapType>
pub const fn with_nullability(self, nullable: bool) -> Self
pub const fn is_func(self) -> bool
pub const fn is_extern(self) -> bool
pub const fn is_exn(self) -> bool
Trait Implementations§
impl Copy for RefType
Source§impl<'de> Deserialize<'de> for RefType
impl<'de> Deserialize<'de> for RefType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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 UnsafeUnpin 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