pub enum MachinePart {
Kernel,
Limits,
Affinity,
Memory,
Filesystem,
Disk,
}Expand description
One part of the machine state, as run(..., machine = [...]) names it.
Variants§
Kernel
kernel: the kernel release and version.
Limits
limits: every resource limit, soft and hard.
Affinity
affinity: the CPUs the command may run on.
Memory
memory: the total and the available memory.
Filesystem
filesystem: the type and mount flags of the file system that holds the
working directory.
Disk
disk: the size and free space of that file system.
Implementations§
Source§impl MachinePart
impl MachinePart
Sourcepub fn from_name(name: &str) -> Option<Self>
pub fn from_name(name: &str) -> Option<Self>
The part named name, or None when no part has that name.
Sourcepub fn parts(names: &[String]) -> Vec<Self>
pub fn parts(names: &[String]) -> Vec<Self>
The parts named in names, in that order, leaving out a name that no part
has.
Sourcepub fn names_text() -> String
pub fn names_text() -> String
The names of every part, as an error lists them: kernel, limits, affinity, memory, filesystem and disk.
Trait Implementations§
Source§impl Clone for MachinePart
impl Clone for MachinePart
impl Copy for MachinePart
Source§impl Debug for MachinePart
impl Debug for MachinePart
Source§impl Display for MachinePart
impl Display for MachinePart
impl Eq for MachinePart
Source§impl Hash for MachinePart
impl Hash for MachinePart
Source§impl Ord for MachinePart
impl Ord for MachinePart
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for MachinePart
impl PartialEq for MachinePart
Source§impl PartialOrd for MachinePart
impl PartialOrd for MachinePart
impl StructuralPartialEq for MachinePart
Auto Trait Implementations§
impl Freeze for MachinePart
impl RefUnwindSafe for MachinePart
impl Send for MachinePart
impl Sync for MachinePart
impl Unpin for MachinePart
impl UnsafeUnpin for MachinePart
impl UnwindSafe for MachinePart
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.