Skip to main content

ProcessPredicate

Enum ProcessPredicate 

Source
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<'_>

Source

pub fn matches(&self, process: &ProcessSnapshot) -> bool

Whether process satisfies this predicate.

Trait Implementations§

Source§

impl<'a> Clone for ProcessPredicate<'a>

Source§

fn clone(&self) -> ProcessPredicate<'a>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for ProcessPredicate<'a>

Source§

impl<'a> Debug for ProcessPredicate<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> Eq for ProcessPredicate<'a>

Source§

impl<'a> PartialEq for ProcessPredicate<'a>

Source§

fn eq(&self, other: &ProcessPredicate<'a>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<'a> StructuralPartialEq for ProcessPredicate<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for ProcessPredicate<'a>

§

impl<'a> RefUnwindSafe for ProcessPredicate<'a>

§

impl<'a> Send for ProcessPredicate<'a>

§

impl<'a> Sync for ProcessPredicate<'a>

§

impl<'a> Unpin for ProcessPredicate<'a>

§

impl<'a> UnsafeUnpin for ProcessPredicate<'a>

§

impl<'a> UnwindSafe for ProcessPredicate<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.