4 releases

Uses new Rust 2021

0.0.3 Aug 5, 2022
0.0.2 May 18, 2022
0.0.1 Apr 23, 2022
0.0.0 Apr 21, 2022

#1103 in Command line utilities

Download history 1016/week @ 2022-04-25 1077/week @ 2022-05-02 1308/week @ 2022-05-09 1380/week @ 2022-05-16 1418/week @ 2022-05-23 1488/week @ 2022-05-30 1934/week @ 2022-06-06 3037/week @ 2022-06-13 2897/week @ 2022-06-20 2415/week @ 2022-06-27 5448/week @ 2022-07-04 6178/week @ 2022-07-11 8027/week @ 2022-07-18 9313/week @ 2022-07-25 7638/week @ 2022-08-01 7721/week @ 2022-08-08

33,098 downloads per month
Used in serfig

Apache-2.0

32KB
848 lines

serde-env   Build Status Latest Version

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

~290–465KB