Crates.io | best_macros |
lib.rs | best_macros |
version | 0.1.3 |
source | src |
created_at | 2021-10-13 11:47:33.80468 |
updated_at | 2021-10-14 14:11:14.333046 |
description | This crate was created for optimize coding in RUST |
homepage | |
repository | https://github.com/tehnarenok/best_macros/ |
max_upload_size | |
id | 464487 |
size | 5,180 |
This crate was created when I had a macros for creating pub structs where all fileds are public.
Previously, to implement a public structure with public fields, you wrote
pub struct Ticket {
pub id: String,
pub museum_id: String,
pub description: String,
pub date: String,
pub time: String,
pub quantity_groups: Vec<QuantityGroup>,
}
Now you can write like this
use best_macros::public_struct;
...
#[public_struct]
struct Ticket {
id: String,
museum_id: String,
description: String,
date: String,
time: String,
quantity_groups: Vec<QuantityGroup>,
}
And this struct and all her fields become a public.
Write your ideas in issue and I will try to implement them