hyperlane-plugin-env 23.3.0

A zero-dependency .env parser, layered typed environment configuration loader, redacting SecretValue wrapper, and HYPERLANE_* ServerConfig builder plugin for the Hyperlane framework.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::*;

/// Secret string wrapper that always renders `[REDACTED]` in `Debug` and `Display`.
#[derive(Clone, Eq, PartialEq)]
pub struct SecretValue {
    /// Raw secret text accessible only via [`SecretValue::expose`].
    pub(crate) inner: String,
}

/// Layered environment configuration loader and `HYPERLANE_*` [`ServerConfig`] builder.
#[derive(Clone, Debug, Default, Eq, PartialEq)]
pub struct EnvPlugin {
    /// Optional prefix prepended automatically during key lookups (for example `"HYPERLANE_"`).
    pub(crate) prefix: String,
    /// Layered key-value store (`.env` defaults merged with OS env and explicit overrides).
    pub(crate) values: BTreeMap<String, String>,
}