Macro perspective_viewer::derive_wasm_abi
source · macro_rules! derive_wasm_abi { ($type:ty) => { ... }; ($type:ty, FromWasmAbi $(, $symbols:tt)*) => { ... }; ($type:ty, IntoWasmAbi $(, $symbols:tt)*) => { ... }; }
Expand description
A macro for implementing the wasm_bindgen boilerplate for types which
implement serde::{Serialize, Deserialize}.
§Examples
struct MyStruct { .. }
derive_wasm_abi!(MyStruct, FromWasmAbi);
#[wasm_bindgen]
pub fn process_my_struct(s: MyStruct) {}