pub struct OsRelease {
pub id: String,
pub id_like: Vec<String>,
pub version_id: Option<String>,
pub codename: Option<String>,
pub variant_id: Option<String>,
pub pretty_name: Option<String>,
}Expand description
Parsed representation of /etc/os-release.
Only the fields relevant to distro detection are captured; unknown keys are silently ignored (they are not security-relevant here).
Fields§
§id: StringID — e.g. "ubuntu", "fedora", "debian".
id_like: Vec<String>ID_LIKE — space-separated parent distro IDs, e.g. ["debian"].
version_id: Option<String>VERSION_ID — e.g. "26.04", "41".
codename: Option<String>VERSION_CODENAME — e.g. "noble", "jammy".
variant_id: Option<String>VARIANT_ID — e.g. "core", "silverblue", "kinoite".
pretty_name: Option<String>PRETTY_NAME — human-readable distribution name.
Trait Implementations§
impl Eq for OsRelease
impl StructuralPartialEq for OsRelease
Auto Trait Implementations§
impl Freeze for OsRelease
impl RefUnwindSafe for OsRelease
impl Send for OsRelease
impl Sync for OsRelease
impl Unpin for OsRelease
impl UnsafeUnpin for OsRelease
impl UnwindSafe for OsRelease
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more