Trait nanvm_lib::js::any_cast::AnyCast

source ·
pub trait AnyCast<D: Dealloc>: Sized {
    // Required methods
    unsafe fn has_same_type(any_internal: u64) -> bool;
    unsafe fn move_to_any_internal(self) -> u64;
    unsafe fn from_any_internal(any_internal: u64) -> Self;

    // Provided method
    fn move_to_any(self) -> Any<D> { ... }
}

Required Methods§

source

unsafe fn has_same_type(any_internal: u64) -> bool

source

unsafe fn move_to_any_internal(self) -> u64

source

unsafe fn from_any_internal(any_internal: u64) -> Self

Provided Methods§

source

fn move_to_any(self) -> Any<D>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<D: Dealloc> AnyCast<D> for f64

source§

unsafe fn has_same_type(u: u64) -> bool

source§

unsafe fn move_to_any_internal(self) -> u64

source§

unsafe fn from_any_internal(u: u64) -> Self

Implementors§

source§

impl<D: Dealloc, T: RefCast<D>> AnyCast<D> for Ref<T, D>

source§

impl<D: Dealloc, T: ValueCast> AnyCast<D> for T
where u64: Cast<T>,