Trait IntoThreadSafeJsValue

Source
pub trait IntoThreadSafeJsValue: Sized {
    // Required method
    fn into_thread_safe_js_value(self) -> ThreadSafeJsValue<Self>
       where Self: IntoWasmAbi;
}
Expand description

A trait for converting a value into a ThreadSafeJsValue.

This is useful for converting values that are not Send or Sync. When they don’t have the From trait implemented for ThreadSafeJsValue.

Required Methods§

Source

fn into_thread_safe_js_value(self) -> ThreadSafeJsValue<Self>
where Self: IntoWasmAbi,

Converts the value into a ThreadSafeJsValue.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§