metal-rs
metal-rs copied to clipboard
Migrate to foreign_type! macro
See https://docs.rs/foreign-types/0.4.0/foreign_types/
What's not clear to me is how this works with a parent type semantics: current macro in metal-rs supports it and uses it, but I don't see it in the foreign_types crate. cc @sfackler
What do you mean by parent type semantics? Upcasting? You'd probably end up making a separate trait and macro that wraps foreign_types!.
@sfackler I mean this - https://github.com/gfx-rs/metal-rs/blob/1b0c776d889a222bf986cb5adfdb5af3d0bfd9ea/src/lib.rs#L66
On a second look, it's just one impl Deref away from what you have. So we can just add it ourselves.