pub enum ProcessSortKey {
Cpu,
Memory,
Read,
Write,
Pid,
Name,
Age,
User,
State,
Threads,
Virtual,
}Expand description
A sortable column of the process table (§7.2).
One variant per sortable column, using the same names the [processes] sort
config key and the --sort flag accept (§12), so a config value round-trips
through ProcessSortKey::as_str and FromStr without a translation table
somewhere else in the codebase.
Variants§
Cpu
CPU percentage, core-normalized. The default, per §12.
Memory
Resident set size.
Also the ordering of the MEM% column: the share of total memory is RSS
divided by a constant, so it produces the same order and does not need a
second key (§7.2 lists them as one priority level).
Read
Read throughput.
Write
Write throughput.
Pid
Process id.
Name
Process name, then command line.
Age
Time since the process started.
User
Owning user.
State
Scheduling state.
Threads
Thread count.
Virtual
Virtual size.
Implementations§
Source§impl ProcessSortKey
impl ProcessSortKey
Sourcepub const ALL: [Self; 11]
pub const ALL: [Self; 11]
Every key, in the order the sort selector (s, §6.2) should list them.
Ordered by the §7.2 column priority so the most useful sorts are the ones nearest the top of the selector.
Trait Implementations§
Source§impl Clone for ProcessSortKey
impl Clone for ProcessSortKey
Source§fn clone(&self) -> ProcessSortKey
fn clone(&self) -> ProcessSortKey
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ProcessSortKey
Source§impl Debug for ProcessSortKey
impl Debug for ProcessSortKey
Source§impl Default for ProcessSortKey
impl Default for ProcessSortKey
Source§fn default() -> ProcessSortKey
fn default() -> ProcessSortKey
Source§impl Display for ProcessSortKey
impl Display for ProcessSortKey
impl Eq for ProcessSortKey
Source§impl FromStr for ProcessSortKey
impl FromStr for ProcessSortKey
Source§fn from_str(text: &str) -> Result<Self, Self::Err>
fn from_str(text: &str) -> Result<Self, Self::Err>
Parses a sort field name.
ASCII case is ignored and - is accepted for _, because a value typed on
the command line and a value written in TOML should not disagree. The alias
list is fixed and local: §12 requires configuration parsing to be
deterministic, so there is no fuzzy matching and no locale involvement.