| Crates.io | easy_macro |
| lib.rs | easy_macro |
| version | 0.1.0 |
| created_at | 2025-04-21 04:22:23.076556+00 |
| updated_at | 2025-04-21 04:22:23.076556+00 |
| description | Easy macro collection |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1642276 |
| size | 9,595 |
Most usefull rust macros
Explore the docs »
Report Bug
·
Request Feature
I have created a library for combine all rust macro what i use in one place. I tryed make this macro max readable.
Just add new dependencie in your Cargo.toml file.
[dependencies]
easy_macro = "0.1"
use easy_macro::EasyBuilder;
#[derive(EasyBuilder)]
struct MyStruct {
field1: i32,
field2: String,
}
impl Default for MyStruct {
fn default() -> Self {
Self {
field1: 0,
field2: String::from("123123")
}
}
}
fn main() {
let builded_struct = MyStruct::default().set_field1(42).set_field2(String::from("pewpew"));
}
For more examples, please refer to the Documentation
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)Distributed under the MIT License. See LICENSE.txt for more information.
Bogdan Lipovtsev - megafreelancer2012@gmail.com
Project Link: https://github.com/zaqxsw-dev/easy_macro