We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
property
Add an option to specify exported methods as setters and getters in the property attribute when deriving property registration:
#[derive(NativeClass)] #[inherit(Reference)] struct Foo { #[property(set = "set_bar", get = "get_bar")] bar: i64, } #[methods] impl Foo { #[export] fn set_bar(&mut self, _owner: &Reference, value: i64) { self.bar = value; } #[export] fn get_bar(&mut self, _owner: &Reference) -> i64 { self.bar } }