derive_dumb

Crates.ioderive_dumb
lib.rsderive_dumb
version0.2.4
sourcesrc
created_at2020-01-20 17:33:43.982053
updated_at2023-10-25 12:28:16.4506
descriptionDerive `Dumb` generates a structure in which all fields are public. Original structure can be converted using function call `dumb`.
homepage
repositoryhttps://github.com/loomaclin/derive_dumb
max_upload_size
id200498
size3,899
Rust (LooMaclin)

documentation

https://docs.serde.rs/derive_dumb/

README

Description

Derive Dumb generates a structure in which all fields are public. Original structure can be converted using function call dumb.

Example

#[derive(Dumb)]
pub struct A {
    a: String,
}

Generates:

pub struct DumbA {
    pub a: String,
}
impl A {
    fn dumb(self) -> DumbA {
        DumbA {
            a: self.a,
        }
    }
}
Commit count: 10

cargo fmt