New

Derive Macro New 

Source
#[derive(New)]
{
    // Attributes available to this derive:
    #[new]
}
Expand description

Implement New for a structure.

ยงSample.

use derive_tools::New;

#[ derive( New ) ]
struct MyStruct;

let my_struct = MyStruct::new();
dbg!( my_struct );

To learn more about the feature, study the module derive_tools::New.