envoy

Conveniences for manipulating environment variables

4 releases

Uses old Rust 2015

0.1.3 Oct 4, 2018
0.1.2 Oct 1, 2018
0.1.1 Oct 1, 2018
0.1.0 Oct 1, 2018

#1259 in Rust patterns

Download history 173/week @ 2022-08-13 83/week @ 2022-08-20 153/week @ 2022-08-27 99/week @ 2022-09-03 444/week @ 2022-09-10 231/week @ 2022-09-17 118/week @ 2022-09-24 109/week @ 2022-10-01 122/week @ 2022-10-08 379/week @ 2022-10-15 72/week @ 2022-10-22 213/week @ 2022-10-29 179/week @ 2022-11-05 87/week @ 2022-11-12 142/week @ 2022-11-19 87/week @ 2022-11-26

521 downloads per month

MIT/Apache

9KB
148 lines

Envoy

Envoy is a small library providing more convenient abstractions for manipulating environment variables than the standard library. In particular, Envoy has APIs for manipulating PATH-like variables.

Example

let path = envoy::path();           // get the `PATH`/`Path` variable

let updated = path.split()
    .remove("/usr/local/bin")       // remove /usr/local/bin
    .prefix("/home/dherman/.bin");  // add /home/dherman/.bin to the front

envoy::set_path(updated.join().unwrap());

License

Licensed under either of

at your option.

Code of Conduct

Contribution to Envoy is organized under the terms of the Contributor Covenant Code of Conduct. The maintainer of Envoy, Dave Herman, personally promises to work actively to uphold that code of conduct. We aim to foster a community that is welcoming, inclusive, empathetic, and kind. If you share those goals and want to have fun hacking environment variables, we invite you to join us!

No runtime deps