mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-03-16 02:00:51 +00:00
An extension trait for `Option<T>` and `Result<T, E>` for unwraping the `T` value, or throwing a JS error if it is not available. These methods should have a smaller code size footprint than the normal `Option::unwrap` and `Option::expect` methods, but they are specific to working with wasm and JS. On non-wasm32 targets, defaults to the normal unwrap/expect calls.