pub enum DistroId {
Fedora {
version: u32,
},
FedoraSilverblue {
version: u32,
},
Ubuntu {
major: u32,
minor: u32,
},
UbuntuCore {
major: u32,
minor: u32,
},
Debian {
version: Option<u32>,
},
Other {
id: String,
version_id: Option<String>,
id_like: Vec<String>,
},
}Expand description
Typed distro identity derived from OsRelease.
Variants§
Fedora
Plain Fedora (Workstation, Server, …).
FedoraSilverblue
Fedora Silverblue, Kinoite, or Sericea (immutable desktops).
Ubuntu
Ubuntu LTS or interim.
UbuntuCore
Ubuntu Core (IoT).
Debian
Debian.
Other
Any other distro — fields forwarded from OsRelease.
Implementations§
Source§impl DistroId
impl DistroId
Sourcepub fn family(&self) -> DistroFamily
pub fn family(&self) -> DistroFamily
Returns the broad family this distro belongs to.
§ID_LIKE fallback for unrecognised derivatives
When self is Other (the running distro’s ID did not match any
distro this crate detects directly — e.g. Linux Mint ID=linuxmint,
Pop!_OS ID=pop), this consults ID_LIKE before giving up: if it
contains "debian" or "ubuntu" the distro routes as
DistroFamily::Debian; if it contains "fedora" or "rhel" it
routes as DistroFamily::Fedora. This is best-effort derivative
support, not full compatibility validation — ID_LIKE is a hint
the distro maintainer supplies in /etc/os-release (see
os-release(5)), not a guarantee the derivative’s package manager,
repositories, or service names are wire-compatible with the parent.
Actions may still fail at execution time on a derivative that
diverges from its stated parent.
Sourcepub fn is_supported(&self) -> bool
pub fn is_supported(&self) -> bool
Returns true for distros and versions with a shipped action backend.
Support policy:
- Fedora Atomic variants 41+ (Silverblue, Kinoite, and siblings)
- Ubuntu LTS: 22.04, 24.04, 26.04 (interim releases like 26.10 are excluded)
Plain Fedora remains detectable so the planner can explain the gap, but
it is not supported until the dedicated dnf action family ships.