Crate rs_release
source ·Expand description
os-release parser
Usage example
use rs_release::parse_os_release;
let os_release_path = "/etc/os-release";
if let Ok(os_release) = parse_os_release(os_release_path) {
println!("Parsed os-release:");
for (k, v) in os_release {
println!("{}={}", k, v);
}
} else {
eprintln!("Cannot parse {}", os_release_path);
}
Enums
Represents possible errors when parsing os-release file/string
Functions
Tries to find and parse os-release in common paths. Stops on success.
Parses key-value pairs from
path
Parses key-value pairs from
data
stringType Definitions
A specialized
Result
type for os-release parsing operations.