generate_with_config

Function generate_with_config 

Source
pub fn generate_with_config(
    input: &PathBuf,
    output_dir: Option<&PathBuf>,
    enable_warnings: bool,
    separator: &str,
) -> Result<(), String>
Expand description

Generates rust source code from the given input file.

ยงParameters

The following parameters can be supplied to this function:

  • input - Path to the input file in any format as specified in README.md
  • output_dir - Directory where the output file is generated. The output file will alyways be named keygen.rs. The necessary directories will be created. If None is supplied the default value (generated/keygen) will be used.
  • enable_warnings - Whether the generated code should trigger warnings, like naming-conventions or unused code. If set to false, those warnings will be ignored.
  • separator - Separator to use in the generated constants (e.g. ".", ":", "/").