Skip to content

v1.0.6

Latest
Compare
Choose a tag to compare
@ImaMapleTree ImaMapleTree released this 11 Jun 16:27
1d86aa2

Changes

  • Adds shorthand feature which when enabled allows for the usage of "shorthand" field properties

Example

use derive_ctor::ctor;

#[derive(ctor)]
struct MyStruct {
    #[expr(100)]  // if using "shorthand" feature we can use "#[expr]" instead of "#[ctor(expr)]"
    value: u32
}

let my_struct = MyStruct::new();