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§

Type Aliases§

  • A specialized Result type for os-release parsing operations.