Skip to main content

CapabilitySnapshot

Struct CapabilitySnapshot 

Source
pub struct CapabilitySnapshot {
Show 22 fields pub per_process_io: CapabilityState, pub per_process_threads: CapabilityState, pub per_process_open_files: CapabilityState, pub per_process_sockets: CapabilityState, pub per_process_working_directory: CapabilityState, pub per_core_cpu: CapabilityState, pub cpu_breakdown: CapabilityState, pub load_average: CapabilityState, pub swap_activity: CapabilityState, pub disk_io: CapabilityState, pub disk_busy: CapabilityState, pub filesystem_capacity: CapabilityState, pub network_counters: CapabilityState, pub network_link_speed: CapabilityState, pub network_errors: CapabilityState, pub temperatures: CapabilityState, pub battery: CapabilityState, pub linux_psi: CapabilityState, pub cgroup_limits: CapabilityState, pub kernel_threads: CapabilityState, pub process_signals: CapabilityState, pub renice: CapabilityState,
}
Expand description

Every capability the UI branches on.

Fields§

§per_process_io: CapabilityState

Per-process read/write byte counters.

§per_process_threads: CapabilityState

Per-process thread counts.

§per_process_open_files: CapabilityState

Per-process open file descriptor counts.

§per_process_sockets: CapabilityState

Per-process socket counts.

§per_process_working_directory: CapabilityState

Per-process working directory.

§per_core_cpu: CapabilityState

Per-logical-CPU utilization.

§cpu_breakdown: CapabilityState

The user/system/idle CPU time split.

§load_average: CapabilityState

Load averages.

§swap_activity: CapabilityState

Swap-in and swap-out rates, as opposed to swap capacity.

§disk_io: CapabilityState

Block-device throughput counters.

§disk_busy: CapabilityState

Block-device busy percentage (§7.3).

§filesystem_capacity: CapabilityState

Filesystem capacity.

§network_counters: CapabilityState

Interface byte and packet counters.

§network_link_speed: CapabilityState

Negotiated link speed, without which no utilization is shown (§7.4).

§network_errors: CapabilityState

Interface error and drop counters.

§temperatures: CapabilityState

Temperature sensors.

§battery: CapabilityState

Battery.

§linux_psi: CapabilityState

Linux /proc/pressure/*.

§cgroup_limits: CapabilityState

cgroup limits, exposed separately from host totals (§9.2).

§kernel_threads: CapabilityState

Whether kernel threads are distinguishable, so they can be hidden (§7.2).

§process_signals: CapabilityState

Whether signals can be sent at all.

§renice: CapabilityState

Whether renice is available (§6.2).

Implementations§

Source§

impl CapabilitySnapshot

Source

pub const COUNT: usize = 22

The number of capabilities tracked.

Source

pub fn entries(&self) -> [(&'static str, CapabilityState); 22]

Every capability paired with its display label, for the Inspect screen.

The order is stable so the panel does not reshuffle between frames.

Source

pub fn unavailable(&self) -> Vec<(&'static str, CapabilityState)>

Capabilities that are missing, with the reason, for the diagnostics subsection §7.5 requires.

Source

pub fn any_permission_denied(&self) -> bool

Whether any capability is denied rather than merely absent, so the UI can show one privilege hint instead of one per metric.

Trait Implementations§

Source§

impl Clone for CapabilitySnapshot

Source§

fn clone(&self) -> CapabilitySnapshot

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 Copy for CapabilitySnapshot

Source§

impl Debug for CapabilitySnapshot

Source§

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

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

impl Default for CapabilitySnapshot

Source§

fn default() -> CapabilitySnapshot

Returns the “default value” for a type. Read more
Source§

impl Eq for CapabilitySnapshot

Source§

impl PartialEq for CapabilitySnapshot

Source§

fn eq(&self, other: &CapabilitySnapshot) -> 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 CapabilitySnapshot

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.