#[non_exhaustive]pub enum Field {
Show 39 variants
Pid,
Comm,
State,
Ppid,
Pgrp,
Session,
Tty,
Tpgid,
MinFlt,
MajFlt,
Priority,
Nice,
StartTime,
Processor,
VirtMem,
ResMem,
User,
PercentCpu,
PercentMem,
Time,
Nlwp,
Tgid,
PercentNormCpu,
Elapsed,
SchedPolicy,
ProcComm,
ProcExe,
Cwd,
Pss,
Swap,
Private,
Epss,
Cgroup,
Container,
GpuPercent,
GpuTime,
CpuDelayPercent,
IoDelayPercent,
SwapDelayPercent,
}Expand description
A displayable per-process column.
Variants mirror htop’s RowField.h / <platform>/ProcessField.h semantics.
The numeric IDs deliberately do not match htop: only the htoprc importer
needs name-level compatibility.
Render with match, never dyn dispatch — thousands of rows times dozens of
columns per frame makes dynamic dispatch measurable.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Pid
Comm
State
Ppid
Pgrp
Session
Tty
Tpgid
MinFlt
MajFlt
Priority
Nice
StartTime
Processor
VirtMem
ResMem
User
PercentCpu
PercentMem
Time
Nlwp
Tgid
PercentNormCpu
Elapsed
SchedPolicy
ProcComm
ProcExe
Cwd
Pss
Swap
Private
Epss
Cgroup
Container
GpuPercent
GpuTime
CpuDelayPercent
IoDelayPercent
SwapDelayPercent
Implementations§
Source§impl Field
impl Field
Sourcepub const fn needs_smaps_rollup(self) -> bool
pub const fn needs_smaps_rollup(self) -> bool
Whether reading this column requires /proc/<pid>/smaps_rollup.
The sampler consults this before spending tens of milliseconds per tick on
a kernel VMA walk: a column that is not on screen must not cost anything.
Kept next to the Field definition so a future PSS-derived column cannot
be added without answering the question.
Sourcepub const fn needs_delayacct(self) -> bool
pub const fn needs_delayacct(self) -> bool
Whether reading this column requires a TASKSTATS netlink query.
Same contract as Self::needs_smaps_rollup, with a higher price: every
query is a syscall pair and a kernel task lookup, per process, per tick.
Sourcepub const fn needs_gpu_fdinfo(self) -> bool
pub const fn needs_gpu_fdinfo(self) -> bool
Whether reading this column requires scanning /proc/<pid>/fdinfo.
Same contract as Self::needs_smaps_rollup: a column that is not on
screen must not cost a directory walk per process per tick.
Trait Implementations§
impl Copy for Field
impl Eq for Field
Source§impl Ord for Field
impl Ord for Field
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for Field
impl PartialOrd for Field
impl StructuralPartialEq for Field
Auto Trait Implementations§
impl Freeze for Field
impl RefUnwindSafe for Field
impl Send for Field
impl Sync for Field
impl Unpin for Field
impl UnsafeUnpin for Field
impl UnwindSafe for Field
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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