Macro u8_from_env_or
macro_rules! u8_from_env_or {
($env_var:literal, $default:expr, $doc:literal) => { ... };
}Expand description
Reads a u8 at compile time from the given environment variable, with a default.
- The
$defaultparameter allows to provide a fallback value for when the environment variable is not found. - The
$docparameter allows to provide a documentation string for this tunable (seestr_from_env!).
ยงErrors
- Produces a compile-time error when
option_env!does. - Produces a compile-time error when the environment variable cannot be parsed into a
u8.