5 releases
| 0.1.7 | Jul 11, 2023 |
|---|---|
| 0.1.6 | Jul 11, 2023 |
| 0.1.5 | Jul 11, 2023 |
| 0.1.3 | Jun 13, 2023 |
| 0.1.2 | Jun 11, 2023 |
#6 in #vec-bool
28 downloads per month
2KB
partial_derive
Like Partial<T> of TypeScript, makes all the properties of a struct type an optional property.
Provides Partial derive macro.
#[derive(Partial, Clone)]
#[partial_derive(Clone)]
struct SomeStruct {
pub field_one: i32,
field_two: Vec<bool>,
}
generates
#[derive(Clone)]
struct PartialSomeStruct {
pub field_one: Option<i32>,
field_two: Option<Vec<bool>>,
}