Skip to content

europeDreadlyDevil/CrabStructor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crates.io Version

Auto constructor derive for structures

Simple constructor generator for named structures

#[derive(Constructor, Eq, PartialEq, Debug)]
#[constructor(
    field1 = r#"String::from("test")"#
)]
struct Example {
    field1: String,
    field2: i32
}

assert_eq!(Example::new(2), Example {field1: "test".to_string(), field2: 2});

About

Simple constructor generator for named structures

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages