pub enum Ref<T> {
Val(T),
Null,
}Expand description
A nullable reference type.
Variants§
Implementations§
Trait Implementations§
Source§impl From<UntypedVal> for Ref<ExternRef>
impl From<UntypedVal> for Ref<ExternRef>
Source§fn from(untyped: UntypedVal) -> Self
fn from(untyped: UntypedVal) -> Self
Converts to this type from the input type.
Source§impl From<UntypedVal> for Ref<Func>
impl From<UntypedVal> for Ref<Func>
Source§fn from(untyped: UntypedVal) -> Self
fn from(untyped: UntypedVal) -> Self
Converts to this type from the input type.
impl<T: Copy> Copy for Ref<T>
impl WasmTy for Ref<ExternRef>
impl WasmTy for Ref<Func>
Auto Trait Implementations§
impl<T> Freeze for Ref<T>where
T: Freeze,
impl<T> RefUnwindSafe for Ref<T>where
T: RefUnwindSafe,
impl<T> Send for Ref<T>where
T: Send,
impl<T> Sync for Ref<T>where
T: Sync,
impl<T> Unpin for Ref<T>where
T: Unpin,
impl<T> UnwindSafe for Ref<T>where
T: UnwindSafe,
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