pub struct DistroFacade { /* private fields */ }Expand description
Thin facade that wraps platform::detection for installer use.
Provides convenience methods for the installer layer without duplicating any detection logic.
Implementations§
Source§impl DistroFacade
impl DistroFacade
Sourcepub fn detect() -> Self
pub fn detect() -> Self
Detect the current distribution by delegating to platform::detection.
This is the primary constructor and performs no duplicate parsing.
Sourcepub fn from_info(info: DistroInfo) -> Self
pub fn from_info(info: DistroInfo) -> Self
Create a facade from a pre-built DistroInfo (useful for testing).
Sourcepub fn family(&self) -> DistroFamily
pub fn family(&self) -> DistroFamily
Get the distribution family classification.
Sourcepub fn package_manager(&self) -> PackageManager
pub fn package_manager(&self) -> PackageManager
Get the detected package manager.
Sourcepub fn info(&self) -> &DistroInfo
pub fn info(&self) -> &DistroInfo
Get the underlying DistroInfo.
Sourcepub fn is_debian_family(&self) -> bool
pub fn is_debian_family(&self) -> bool
Check if this is a Debian-family distro.
Sourcepub fn is_arch_family(&self) -> bool
pub fn is_arch_family(&self) -> bool
Check if this is an Arch-family distro.
Sourcepub fn is_rhel_family(&self) -> bool
pub fn is_rhel_family(&self) -> bool
Check if this is a RHEL-family distro.
Sourcepub fn is_suse_family(&self) -> bool
pub fn is_suse_family(&self) -> bool
Check if this is a SUSE-family distro.
Sourcepub fn uses_pacman(&self) -> bool
pub fn uses_pacman(&self) -> bool
Check if the distro uses pacman.
Sourcepub fn uses_zypper(&self) -> bool
pub fn uses_zypper(&self) -> bool
Check if the distro uses zypper.
Trait Implementations§
Source§impl Clone for DistroFacade
impl Clone for DistroFacade
Source§fn clone(&self) -> DistroFacade
fn clone(&self) -> DistroFacade
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 DistroFacade
impl Debug for DistroFacade
Auto Trait Implementations§
impl Freeze for DistroFacade
impl RefUnwindSafe for DistroFacade
impl Send for DistroFacade
impl Sync for DistroFacade
impl Unpin for DistroFacade
impl UnsafeUnpin for DistroFacade
impl UnwindSafe for DistroFacade
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more