Expand description
§envfury
A collection of utilities for procedural reading of the process environment variables.
Structs§
- Error
- Error from reading the env var.
Enums§
- Must
Error - Error while processing a required variable.
- OrElse
TryError - Error while processing a variable or executing a fallible else.
- OrParse
Error - Error while processing a variable or parsing it’s default.
- OrTry
Into Error - Error while processing a variable or executing a
TryInto::try_into. - Value
Error - Error while processing the value.
Functions§
- maybe
- Get the value of environment variable
keyand parse it into the typeTif variable is set. If the variable is not set - returnsNone. Returns an error if the value is invalid Unicode or if the value could not be parsed. - must
- Get the value of environment variable
keyand parse it into the typeTif variable is set. Returns an error if the value is not set, is invalid Unicode or if the value could not be parsed. - or
- Get the value of environment variable
keyand parse it into the typeTif variable is set. If the variable is not set - returns thedefaultargument. Returns an error if the value is invalid Unicode or if the value could not be parsed. - or_
default - Get the value of environment variable
keyand parse it into the typeTif variable is set. If the variable is not set - returns a newly constructed value via theDefaulttrait. Returns an error if the value is invalid Unicode or if the value could not be parsed. - or_else
- Get the value of environment variable
keyand parse it into the typeTif variable is set. If the variable is not set - returns the result of calling thefargument. Returns an error if the value is invalid Unicode or if the value could not be parsed. - or_
else_ try - Get the value of environment variable
keyand parse it into the typeTif variable is set. If the variable is not set - returns theOk-result of calling thefargument. Returns an error if the variable value is invalid Unicode, if the value could not be parsed, or if callingfresulted in an error. - or_into
- Get the value of environment variable
keyand parse it into the typeTif variable is set. If the variable is not set - returns the result of calling.into()on thedefaultargument. Returns an error if the value is invalid Unicode or if the value could not be parsed. - or_
parse - Get the value of environment variable
keyand parse it into the typeTif variable is set. If the variable is not set - returns the result of calling thedefaultand parsing the default argument. Returns an error if the variable value is invalid Unicode, if the value could not be parsed, or if thedefaultcould not be parsed. - or_
try_ into - Get the value of environment variable
keyand parse it into the typeTif variable is set. If the variable is not set - returns theOk-result of calling.try_into()on thedefaultargument. Returns an error if the variable value is invalid Unicode, if the value could not be parsed, or if thedefaultcould not be parsed.