Skip to main content

ProcessDetail

Struct ProcessDetail 

Source
pub struct ProcessDetail {
    pub identity: ProcessIdentity,
    pub working_directory: MetricState<Box<str>>,
    pub root: MetricState<Box<str>>,
    pub open_files: MetricState<u32>,
    pub sockets: MetricState<u32>,
    pub ancestry: MetricState<Vec<AncestorEntry>>,
    pub children: MetricState<Vec<ProcessIdentity>>,
    pub descendants: MetricState<u32>,
    pub nice: MetricState<i32>,
    pub cgroup: MetricState<Box<str>>,
    pub container: MetricState<Box<str>>,
    pub collected_at: SystemTime,
}
Expand description

The expensive per-process fields, collected on demand for the selected process only (§8.6).

Environment variables are deliberately absent from this type, not merely hidden by default: §7.5 forbids showing their values, and §15.2 forbids logging them, so the safest design is never to read them at all.

Fields§

§identity: ProcessIdentity

Which process this describes.

Checked against the current selection before rendering, so a late reply for a process the user has moved off is discarded rather than shown against the wrong row.

§working_directory: MetricState<Box<str>>

Current working directory.

§root: MetricState<Box<str>>

Filesystem root, which differs from / inside a container.

§open_files: MetricState<u32>

Open file descriptor count.

§sockets: MetricState<u32>

Open socket count.

§ancestry: MetricState<Vec<AncestorEntry>>

Ancestry from the immediate parent up towards PID 1.

§children: MetricState<Vec<ProcessIdentity>>

Direct children.

§descendants: MetricState<u32>

Total descendants, including indirect ones (§2.4).

§nice: MetricState<i32>

Scheduling niceness.

§cgroup: MetricState<Box<str>>

cgroup path. Linux only.

§container: MetricState<Box<str>>

Container identity, where derivable from the cgroup path.

§collected_at: SystemTime

When this detail was collected, so the UI can age it.

Implementations§

Source§

impl ProcessDetail

Source

pub fn pending(identity: ProcessIdentity, collected_at: SystemTime) -> Self

An empty detail record for identity, with every field unmeasured.

Trait Implementations§

Source§

impl Clone for ProcessDetail

Source§

fn clone(&self) -> ProcessDetail

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 Debug for ProcessDetail

Source§

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

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

impl PartialEq for ProcessDetail

Source§

fn eq(&self, other: &ProcessDetail) -> bool

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

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ProcessDetail

Auto Trait Implementations§

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.