pub struct Host {
pub os: HostOs,
pub arch: Arch,
pub packages: Option<Packages>,
pub devices: Devices,
}Expand description
This computer: its OS, its CPU, the package manager setup goes through here (None: a Mac
without Homebrew, a Linux distribution with neither apt nor dnf), and the files detection
reads.
Fields§
§os: HostOsThe OS.
arch: ArchThe CPU.
packages: Option<Packages>The package manager, when the machine has one setup goes through.
devices: DevicesThe files and the service detection reads.
Implementations§
Source§impl Host
impl Host
Sourcepub async fn here(runner: &dyn ProcessRunner) -> Host
pub async fn here(runner: &dyn ProcessRunner) -> Host
This computer, its package manager looked up now: Homebrew where its installer puts it;
apt-get, else dnf, when it answers --version (through runner).
Sourcepub fn is_windows_on_arm(&self) -> bool
pub fn is_windows_on_arm(&self) -> bool
Whether it is a PC with Windows on Arm.
Trait Implementations§
impl Eq for Host
impl StructuralPartialEq for Host
Auto Trait Implementations§
impl Forget for Host
impl Freeze for Host
impl Move for Host
impl RefUnwindSafe for Host
impl Send for Host
impl Sync for Hostwhere
RawVecInner: Sync,
impl Unpin for Host
impl UnsafeUnpin for Hostwhere
&'static str: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<PathBuf>: UnsafeUnpin,
impl UnwindSafe for Host
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.