Skip to main content

Crate optionable_derive

Crate optionable_derive 

Source
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.

Derive Macrosยง

DeepMerge
Derive macro to derive the DeepMerge trait from k8s_openapi for structs/enums. All fields have to implement the DeepMerge trait. This trait is already implemented k8s_openapi for many primitive types, wrapper and container types.
MapKeysEq
Derive macro to derive the MapKeysEq trait from optionabe for structs.
Optionable
Derive macro to derive the Optionable trait for structs/enums recursively by generating a type with all fields recursively replaced with Option versions. All non-required fields have to implement the Optionable trait. This trait is already implemented by this library for many primitive types, wrapper and container types.