optionable_codegen 0.3.0

proc_macro2 functions for the derive macro and codegen implementations in the `optionable_derive` crate to derive nested structs/enums with all subfields being optional (e.g. for patches or Kubernetes server side apply).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
pub(crate) enum AddressOpt {
    NumberOnly(Option<u64>),
    Address(Option<String>),
}
#[automatically_derived]
impl ::optionable::Optionable for address::Address {
    type Optioned = AddressOpt;
}
#[automatically_derived]
impl ::optionable::Optionable for AddressOpt {
    type Optioned = AddressOpt;
}