Crate struct_to_config

Source

Macros§

make_cfg
Takes one or more identities of which are struct objects that implement serde Serializable. Optionally, for the first argument, you may provide a boolean flag that if false, you would want the behavior of the macro to default on any struct attribute it cannot convert. Otherwise, if true, it will panic. If not providing a boolean literal as the first argument, you may list as many structs, with the last structs being of higher priority, i.e. it will override the prior key/value, if a matching key is found for its value. Default behavior is that calling this macro will panic if a struct has a non-implemented type, such as (currently) an array of arrays.

Functions§

convert_non_panic
convert_panic