Crate wasm_bindgen_utils_macros

Crate wasm_bindgen_utils_macros 

Source

Attribute Macrosยง

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.