ipv4_addr_from_env

Macro ipv4_addr_from_env 

macro_rules! ipv4_addr_from_env {
    ($env_var:literal, $doc:literal $(,)?) => { ... };
}
Expand description

Reads an IPv4 address at compile time from the given environment variable, produces an Ipv4Addr.

The $doc parameter allows to provide a documentation string for this tunable (see str_from_env!).

ยงErrors

  • Produces a compile-time error if the environment variable is not found.
  • Produces a compile-time error when option_env! does.
  • Produces a compile-time error when the environment variable cannot be parsed into an IPv4 address.