7 releases
0.2.0 | Aug 5, 2024 |
---|---|
0.1.1 | Jan 19, 2023 |
0.1.0 | Sep 15, 2022 |
0.0.3 | Aug 5, 2022 |
0.0.1 | Apr 23, 2022 |
#494 in Parser implementations
41,198 downloads per month
Used in 12 crates
(4 directly)
36KB
888 lines
serde-env

Deserialize env into structs via serde
Quick Start
use serde::Deserialize;
use serde_env::from_env;
#[derive(Debug, Deserialize)]
struct Cargo {
home: String,
}
#[derive(Debug, Deserialize)]
struct Test {
home: String,
cargo: Cargo,
}
fn main() {
let t: Test = from_env().expect("deserialize from env");
assert!(!t.home.is_empty());
assert!(!t.cargo.home.is_empty());
println!("{:?}", t)
}
Contributing
Check out the CONTRIBUTING.md guide for more details on getting started with contributing to this project.
Getting help
Submit issues for bug report or asking questions in discussion.
Acknowledgment
This project is highly inspired by envy
License
Licensed under Apache License, Version 2.0.Dependencies
~205–455KB