pub enum ProcessPredicate<'a> {
Text(&'a FilterPattern),
OwnedBy(u32),
NotKernelThread,
InSubtree(&'a [ProcessIdentity]),
}Expand description
One independently toggleable row test (§7.2).
Separating the three tests keeps them composable: the process screen ANDs whichever are active, the Time Lens contributor list reuses only the text one, and each can be unit-tested on its own.
Variants§
Text(&'a FilterPattern)
The text query over name, command, PID, and user.
OwnedBy(u32)
The user-only toggle: keep rows owned by this uid.
NotKernelThread
The hide-kernel-threads toggle (Linux; §7.2).
InSubtree(&'a [ProcessIdentity])
Keep only the members of one followed subtree.
The membership is computed once per snapshot, by SubtreeUsage, and passed in
as a sorted slice: descendancy is not a property of a single row, so unlike
the other three predicates this one cannot be decided from the row alone.
It is a predicate rather than a step applied after filtering so that the existing
machinery does the right thing for free — in tree mode
ProcessTree::from_snapshot_filtered re-attaches a hidden process’s children to
their nearest surviving ancestor, which for a subtree means the followed root
becomes the root of what is drawn.
Implementations§
Source§impl ProcessPredicate<'_>
impl ProcessPredicate<'_>
Sourcepub fn matches(&self, process: &ProcessSnapshot) -> bool
pub fn matches(&self, process: &ProcessSnapshot) -> bool
Whether process satisfies this predicate.
Trait Implementations§
Source§impl<'a> Clone for ProcessPredicate<'a>
impl<'a> Clone for ProcessPredicate<'a>
Source§fn clone(&self) -> ProcessPredicate<'a>
fn clone(&self) -> ProcessPredicate<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more