Module prelude

Module prelude 

Source

Re-exports§

pub use paste;
pub use js_sys;
pub use tsify;
pub use wasm_bindgen;
pub use serde_wasm_bindgen;
pub use wasm_bindgen_futures;
pub use super::result::*;

Structs§

Closure
A handle to both a closure in Rust as well as JS closure which will invoke the Rust closure.
JsError
Convenience type for use on exported fn() -> Result<T, JsError> functions, where you wish to throw a JavaScript Error object.
JsValue
Representation of an object owned by JS.

Traits§

JsCast
A trait for checked and unchecked casting between JS types.
Tsify
UnwrapThrowExt
An extension trait for Option<T> and Result<T, E> for unwrapping the T value, or throwing a JS error if it is not available.

Functions§

from_js_value
Converts JsValue into a Rust type.
to_js_value
Converts a Rust value into a JsValue.

Attribute Macros§

__wasm_bindgen_class_marker
wasm_bindgen
A list of all the attributes can be found here: https://rustwasm.github.io/docs/wasm-bindgen/reference/attributes/index.html
wasm_export
A proc macro that generates the wasm function bindings with WasmEncodedResult return type from rust functions that natively return [Result<T, E>], this makes it possible to avoid throwing on js when return value is [Result::Err] variant, instead it will return WasmEncodedResult<T> normally on js where either of [Result::Ok] or [Result::Err] variants are included within the WasmEncodedResult properties.

Derive Macros§

Tsify