envigil 0.3.0

Keep vigil over your environment — load, parse, and validate env vars with zero dependencies.
Documentation
//! # envigil
//!
//! Keep vigil over your environment.
//!
//! ```rust,no_run
//! use envigil::{EnvSource, VarBuilder};
//!
//! # fn main() -> Result<(), envigil::Error> {
//! let cfg = EnvSource::new()
//!     .prefix("APP_")
//!     .declare(VarBuilder::new("PORT", |v| v.parse::<u16>().map_err(|e| e.to_string()))
//!         .default(8080))
//!     .load()?;
//!
//! let port: &u16 = cfg.get("PORT")?;
//! # Ok(())
//! # }
//! ```

pub mod error;
pub mod layer;
pub mod parse;
pub mod secret;
pub mod source;
pub mod validate;
pub mod var;

pub use error::{Error, Result};
pub use secret::Secret;
pub use source::{Env, EnvSource};
pub use var::VarBuilder;

#[cfg(feature = "derive")]
pub use envigil_derive::EnvConfig;

#[cfg(feature = "dotenv")]
pub mod dotenv;

#[cfg(feature = "miette")]
mod diagnostic;