Expand description
This crate is on its own not really usable. It is re-exported together with the required traits in the optionable crate. The relevant docs can be also found there.
This is only a separate crate as derive macros have to be a separate crate.
Attribute Macros§
- optionable_
kube - Attribute macro to simplify deriving optioned types for
kube::CustomResourcesubfields. For theCustomResourcedefinition itself#[optionable_kube_cr]is the correct attribute macro. - optionable_
kube_ cr - Attribute macro to simplify deriving optioned types for
kube::CustomResource. Must be placed prior to any #[derive(…)] statements for the given type. Has to be used together with#[derive(kube::CustomResource)].
Derive Macros§
- Optionable
- Derive macro to derive the
Optionabletrait for structs/enums recursively by generating a type with all fields recursively replaced withOptionversions. All non-required fields have to implement theOptionabletrait. This trait is already implemented by this library for many primitive types, wrapper and container types. - Optionable
Kube Crd - For most use cases just using the attribute macro
#[optionable_kube_cr]is likely a better fit.