Module codegen

Source
Expand description

The purpose of this module is to convert generic Values to Rust structs and enums.

Unless you are using this crate as part of a proc macro, or other library - it is likely you won’t need to use this module directly. Instead, you should use the functions in the top level of this crate.

Functions§

define_enum_from_filenames
Define Rust enum based on the file names within the given directory.
define_enum_from_keys
Define Rust enum based on the keys of the given key-value map.
define_structs
Define a set of Rust structs based on the given value.
define_structs_from_file_contents
Define a set of Rust structs based on the contents of all files in the given directory.
define_structs_from_values
Define a set of Rust structs based on the values of the given key-value map.