mitoo 0.3.0

mitoo is a Rust toolkit library that encapsulates methods such as configuration reading, file operations, encryption and decryption, transcoding, regular expressions, threading, collections, trees, sqlite, rabbitMQ, etc., and customizes or integrates various Util tool classes.
Documentation
use std::collections::HashMap;

/// Environment variable utility class
pub struct EnvUtil;

impl EnvUtil {

    pub fn get(key: &str) -> Option<String> {
        std::env::var(key).ok()
    }

    pub fn all() -> HashMap<String, String>{
        let mut map = ::std::collections::HashMap::new();
        // 获取所有环境变量的迭代器
        for (key, value) in std::env::vars() {
            println!("{}: {}", key, value);
            map.insert(key, value);
        }
        map
    }
    
}