pub struct OsRelease {Show 16 fields
pub ansi_color: String,
pub build_id: String,
pub bug_report_url: String,
pub documentation_url: String,
pub extra: BTreeMap<String, String>,
pub home_url: String,
pub id: String,
pub id_like: String,
pub logo: String,
pub name: String,
pub pretty_name: String,
pub privacy_policy_url: String,
pub version: String,
pub version_codename: String,
pub version_id: String,
pub support_url: String,
}Fields§
§ansi_color: StringANSI color code for the distribution. This is a six numbers. For example, on ArchLinux, this is “38;2;23;147;209.
build_id: StringIf the distro is a rolling release, it will be “rolling”.
bug_report_url: StringUrl of bug reporting system. This is the URL of the bug reporting system for the distribution. For example, on ArchLinux, this is “https://bugs.archlinux.org”.
documentation_url: StringUrl of the documentation for the distribution. This is the URL of the documentation for the distribution. For example, on ArchLinux, this is “https://wiki.archlinux.org”. The ArchWiki is the biggest documentation of every open source project. This is not the same as the URL of the distribution’s website.
extra: BTreeMap<String, String>Extra keys will be stored in this map.
home_url: StringHomepage of the distribution. This is the homepage of the distribution. For example, on ArchLinux, this is “https://www.archlinux.org/”.
id: StringThe name of the distribution in the form of a codename. For example, on ArchLinux, this is “archlinux”.
id_like: StringRelated distribution id. If the distro is derived from another distro, it will be the id of the parent distro. For example, on Manjaro, this is “arch”.
logo: StringThe name of the operating system. This is the name of the operating system as it appears to the user. For example, on ArchLinux, this is “Arch Linux”.
name: StringLogo of the distribution. This is the logo of the distribution. For example, on ArchLinux, this is “archlinux-logo”.
pretty_name: StringThe pretty name of the operating system.
privacy_policy_url: StringPrivacy policy url. This is the URL of the privacy policy of the distribution. For example, on ArchLinux, this is “https://www.archlinux.org/legal/privacy-policy/”.
version: StringThe version of the distribution. This is the version of the distribution. For example, on ArchLinux, this is “” because ArchLinux is rolling release so ArchLinux doesn’t have version.
version_codename: StringThe version codename of the distribution. This is the version codename of the distribution. For example, on ArchLinux, this is “” because ArchLinux is rolling release so ArchLinux doesn’t have version.
version_id: StringThe version id of the distribution. This is the version id of the distribution. For example, on ArchLinux, this is “” because ArchLinux is rolling release so ArchLinux doesn’t have version.
support_url: StringThe support url of the distribution. This is the support url of the distribution. For example, on ArchLinux, this is “https://bbs.archlinux.org/”
Implementations§
Trait Implementations§
Source§impl FromIterator<String> for OsRelease
impl FromIterator<String> for OsRelease
Source§fn from_iter<I: IntoIterator<Item = String>>(lines: I) -> Self
fn from_iter<I: IntoIterator<Item = String>>(lines: I) -> Self
Parse the lines of the /etc/os-release file.
The lines are expected to be in the form of <key> = <value>.
If keys aren’t in the list of standard keys, there will be in extra field.
See the OsRelease struct for the list of standard keys.