env
Dotenv (.env) helpers working on plain text: no file or process-environment access, so
they are deterministic and easy to test. Read the file yourself, edit the content here, and
write it back.
Install
Section titled “Install”Cargo feature env (enabled by default). To compile only this module:
or in Cargo.toml:
Import path: helpers4::env.
| Item | What it does |
|---|---|
get | Returns the value of key in dotenv content, or None when it is not assigned. |
parse | Parses dotenv content into (key, value) pairs, in file order. |
remove | Removes every assignment of key from dotenv content and returns the new content. |
set | Sets key to value in dotenv content and returns the new content. |
Error types
Section titled “Error types”Documented on the page of the helper that returns them.
| Type | Returned by |
|---|---|
InvalidKeyError | set |
