guide: Add imported and exported types to "supported types" reference

This commit is contained in:
Nick Fitzgerald 2018-08-03 16:24:02 -07:00 committed by Alex Crichton
parent 536bf5e0d7
commit 93b3216014

View File

@ -4,6 +4,8 @@ The table below provides an overview of all the types that wasm-bindgen can send
| Type | `T` parameter | `&T` parameter | `&mut T` parameter | `T` return value | `Option<T>` parameter | `Option<T>` return value | | Type | `T` parameter | `&T` parameter | `&mut T` parameter | `T` return value | `Option<T>` parameter | `Option<T>` return value |
|:---:|:---:|:---:|:---:|:---:|:---:| |:---:|:---:|:---:|:---:|:---:|:---:|
| Imported `extern Whatever;` JavaScript Types | Yes | Yes | Yes | Yes | Yes | Yes |
| Exported `struct Whatever` Rust Types | Yes | Yes | Yes | Yes | Yes | Yes |
| `str` | No | Yes | No | Yes | Yes | No | | `str` | No | Yes | No | Yes | Yes | No |
| `char` | Yes | No | No | Yes | No | No | | `char` | Yes | No | No | Yes | No | No |
| `bool` | Yes | No | No | Yes | No | No | | `bool` | Yes | No | No | Yes | No | No |