pub enum LinuxDistro {
Debian,
Fedora,
Arch,
Suse,
Unknown,
}Expand description
Distribution family, which is what package names actually key off.
Families rather than distributions: Mint installs like Debian and CachyOS
installs like Arch, and enumerating every derivative would be a losing race.
Variants§
Debian
Fedora
Arch
Suse
Unknown
Identified as none of the above — including when /etc/os-release was
missing or unreadable, which callers report the same way.
Implementations§
Source§impl LinuxDistro
impl LinuxDistro
Sourcepub const fn label(self) -> &'static str
pub const fn label(self) -> &'static str
Human-readable family name, for headings and instructions.
Sourcepub const fn installer(self) -> Option<&'static str>
pub const fn installer(self) -> Option<&'static str>
The install command this family uses, without sudo.
None for Self::Unknown, where guessing would be worse than saying
so: a wrong command is followed and fails, a missing one is looked up.
Trait Implementations§
Source§impl Clone for LinuxDistro
impl Clone for LinuxDistro
Source§fn clone(&self) -> LinuxDistro
fn clone(&self) -> LinuxDistro
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LinuxDistro
impl Debug for LinuxDistro
Source§impl PartialEq for LinuxDistro
impl PartialEq for LinuxDistro
Source§fn eq(&self, other: &LinuxDistro) -> bool
fn eq(&self, other: &LinuxDistro) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for LinuxDistro
impl Eq for LinuxDistro
impl StructuralPartialEq for LinuxDistro
Auto Trait Implementations§
impl Freeze for LinuxDistro
impl RefUnwindSafe for LinuxDistro
impl Send for LinuxDistro
impl Sync for LinuxDistro
impl Unpin for LinuxDistro
impl UnsafeUnpin for LinuxDistro
impl UnwindSafe for LinuxDistro
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