-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
more-typesAdding support for more Rust types to cross the boundaryAdding support for more Rust types to cross the boundary
Description
Annotating a function which returns a Vec<String>
with #[wasm_bindgen]
gives the following error:
error[E0277]: the trait bound `std::boxed::Box<[std::string::String]>: wasm_bindgen::convert::IntoWasmAbi` is not satisfied
--> src/lib.rs:12:1
|
12 | #[wasm_bindgen]
| ^^^^^^^^^^^^^^^ the trait `wasm_bindgen::convert::IntoWasmAbi` is not implemented for `std::boxed::Box<[std::string::String]>`
|
= help: the following implementations were found:
<std::boxed::Box<[f64]> as wasm_bindgen::convert::IntoWasmAbi>
<std::boxed::Box<[u32]> as wasm_bindgen::convert::IntoWasmAbi>
<std::boxed::Box<[i16]> as wasm_bindgen::convert::IntoWasmAbi>
<std::boxed::Box<[u16]> as wasm_bindgen::convert::IntoWasmAbi>
and 5 others
= note: required because of the requirements on the impl of `wasm_bindgen::convert::IntoWasmAbi` for `std::vec::Vec<std::string::String>`
EliSnow, rescribet, keith-hall, tonyhb, ankolaver and 5 more
Metadata
Metadata
Assignees
Labels
more-typesAdding support for more Rust types to cross the boundaryAdding support for more Rust types to cross the boundary