Implement #[wasm_bindgen(extends = ...)]

This commit implements the `extends` attribute for `#[wasm_bindgen]` to
statically draw the inheritance hierarchy in the generated bindings, generating
appropriate `AsRef`, `AsMut`, and `From` implementations.
This commit is contained in:
Alex Crichton
2018-08-04 10:00:30 -07:00
parent 11553a1af2
commit 37db88ebfa
10 changed files with 331 additions and 4 deletions

View File

@ -128,6 +128,7 @@ pub struct ImportType {
pub attrs: Vec<syn::Attribute>,
pub doc_comment: Option<String>,
pub instanceof_shim: String,
pub extends: Vec<Ident>,
}
#[cfg_attr(feature = "extra-traits", derive(Debug, PartialEq, Eq))]