mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-12 12:31:22 +00:00
guide: Add bool
example to supported types section
This commit is contained in:
@ -109,6 +109,18 @@ garbage-collected heap and the Wasm linear memory with `TextDecoder` and
|
||||
|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
|
||||
| Yes | No | No | Yes | No | No | A JavaScript boolean value |
|
||||
|
||||
### Example Rust Usage
|
||||
|
||||
```rust
|
||||
{{#include ../../../examples/guide-supported-types-examples/src/bool.rs}}
|
||||
```
|
||||
|
||||
### Example JavaScript Usage
|
||||
|
||||
```js
|
||||
{{#include ../../../examples/guide-supported-types-examples/bool.js}}
|
||||
```
|
||||
|
||||
## `wasm_bindgen::JsValue`
|
||||
|
||||
| `T` parameter | `&T` parameter | `&mut T` parameter | `T` return value | `Option<T>` parameter | `Option<T>` return value | JavaScript representation |
|
||||
|
Reference in New Issue
Block a user