guide: Add Box<[JsValue]> example to supported types section

This commit is contained in:
Nick Fitzgerald
2018-08-13 17:08:18 -07:00
parent 60307e81f9
commit d1b2299340
4 changed files with 52 additions and 0 deletions

View File

@ -145,6 +145,18 @@ garbage-collected heap and the Wasm linear memory with `TextDecoder` and
|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
| Yes | No | No | Yes | Yes | Yes | A JavaScript `Array` object |
### Example Rust Usage
```rust
{{#include ../../../examples/guide-supported-types-examples/src/boxed_js_value_slice.rs}}
```
### Example JavaScript Usage
```js
{{#include ../../../examples/guide-supported-types-examples/boxed_js_value_slice.js}}
```
## `*const T` `*mut T`
| `T` parameter | `&T` parameter | `&mut T` parameter | `T` return value | `Option<T>` parameter | `Option<T>` return value | JavaScript representation |