Crates.io | derive_dumb |
lib.rs | derive_dumb |
version | 0.2.4 |
source | src |
created_at | 2020-01-20 17:33:43.982053 |
updated_at | 2023-10-25 12:28:16.4506 |
description | Derive `Dumb` generates a structure in which all fields are public. Original structure can be converted using function call `dumb`. |
homepage | |
repository | https://github.com/loomaclin/derive_dumb |
max_upload_size | |
id | 200498 |
size | 3,899 |
Derive Dumb
generates a structure in which all fields are public.
Original structure can be converted using function call dumb
.
#[derive(Dumb)]
pub struct A {
a: String,
}
Generates:
pub struct DumbA {
pub a: String,
}
impl A {
fn dumb(self) -> DumbA {
DumbA {
a: self.a,
}
}
}