Hi there! I need a little help with something
I'm coding a game with godot-rust (gdnative 0.11.0) and i have a workspace with a rust struct
pub struct MyStruct {...}
a workspace with a godot interface
pub struct Interface;
pub struct Wrapper(MyStruct);
impl Interface {
pub fn leak_the_wrapper() -> WrapperType {...}
}
The problem I have is i want to derive a trait for my wrapper that i dont want to derive for MyStruct because better compilation time basically
but rust wont let me write this
#[derive(MyTrait)]
pub struct Wrapper(MyStruct);
Complaining that MyStruct doesn't implement the trait.
What's odd is that I could just Dervive the trait for my struct directly but i dont wanna do that (because i'm not sure how to) :/
Is there a nice solution to this that preferably doesn't involve cfg! ?
Thanks ❤️