Crate envfury

source ·
Expand description

§envfury

A collection of utilities for procedural reading of the process environment variables.

Structs§

  • Error from reading the env var.

Enums§

  • Error while processing a required variable.
  • Error while processing a variable or parsing it’s default.
  • Error while processing the value.

Functions§

  • Get the value of environment variable key and parse it into the type T if variable is set. If the variable is not set - returns None. Returns an error if the value is an invalid unicode or if the value could not be parsed.
  • Get the value of environment variable key and parse it into the type T if variable is set. Returns an error if the value is not set, is an invalid unicode or if the value could not be parsed.
  • Get the value of environment variable key and parse it into the type T if variable is set. If the variable is not set - returns the default argument. Returns an error if the value is an invalid unicode or if the value could not be parsed.
  • Get the value of environment variable key and parse it into the type T if variable is set. If the variable is not set - returns the result of calling the default argument. Returns an error if the value is an invalid unicode or if the value could not be parsed.
  • Get the value of environment variable key and parse it into the type T if variable is set. If the variable is not set - returns the result of calling the default and parsing the default argument. Returns an error if the variable value is an invalid unicode or if the value could not be parsed, or if the default could not be parsed.