Macro ipv4_addr_from_env_or
macro_rules! ipv4_addr_from_env_or {
($env_var:literal, $default:literal, $doc:literal $(,)?) => { ... };
}
Expand description
Reads an IPv4 address at compile time from the given environment variable, produces an
Ipv4Addr
.
- The
$default
parameter allows to provide a fallback value for when the environment variable is not found. - The
$doc
parameter allows to provide a documentation string for this tunable (seestr_from_env!
).
Produces a compile-time error when option_env!
does.