shadow_rs::core

Module configuration

source
Expand description

Shadow’s configuration and cli parsing code using serde and clap. This contains all of Shadow’s configuration options, some of which are also exposed as CLI options.

Shadow uses schemars to get the option description (its doc comment) and default value so that it can be shown in the CLI help text.

This code should be careful about validating or interpreting values. It should be focused on parsing and checking that the format is correct, and not validating the values. For example for options that take paths, this code should not verify that the path actually exists or perform any path canonicalization. That should be left to other code outside of this module. This is so that the configuration parsing does not become environment-dependent. If a configuration file parses on one system, it should parse successfully on other systems as well.

Structs§

Enums§

Constants§

Traits§

  • A trait for Option-like types that can be flattened into a single Option.

Functions§

  • Parses a string as a list of arguments following the shell’s parsing rules. This uses g_shell_parse_argv() for parsing.