get_bool
Returns key in dotenv content parsed as a boolean, or default when it is absent or not
recognized.
Recognized, case-insensitively: true/false, 1/0, yes/no, on/off.
Import
Section titled “Import”Cargo feature env (enabled by default). To compile only this module:
or in Cargo.toml:
Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
content | &str | The dotenv text to read. |
key | &str | The variable name to look up. |
default | bool | Returned when key is absent or its value is not one of the recognized words. |
Returns
Section titled “Returns”bool — The parsed boolean, or default.
