| Crates.io | orion-variate |
| lib.rs | orion-variate |
| version | 0.10.8 |
| created_at | 2025-09-19 14:26:10.320015+00 |
| updated_at | 2026-01-11 07:56:15.761531+00 |
| description | Variate for Project |
| homepage | |
| repository | https://github.com/galaxy-sec/orion-variate |
| max_upload_size | |
| id | 1846559 |
| size | 193,034 |
一个 Rust 库,提供变量解析与扩展(大小写不敏感字典、环境变量插值)、值类型解析、以及便捷的工作目录守卫等工具。
use orion_variate::{ValueDict, ValueType, CwdGuard};
// 1) 大小写不敏感的字典访问
let mut dict = ValueDict::new();
dict.insert("Host", ValueType::from("example.com"));
assert_eq!(dict.get_case_insensitive("HOST").unwrap().to_string(), "example.com");
// 2) 工作目录守卫(RAII)
let _guard = CwdGuard::change(".")?; // Drop 时自动恢复
更多类型与工具可直接从 crate 根导入:
use orion_variate::{VarCollection, VarDefinition, ValueType, EnvDict};
WorkDir)详见 CHANGELOG.md 获取完整列表与迁移建议。