Struct StatP

Source
pub struct StatP { /* private fields */ }
Expand description

Represent the content of /proc/[pid]/stat and /proc/[pid]/task/[tid]/stat. Returned by stat_of().

Reference to fs/proc/array.c

Implementations§

Source§

impl StatP

Source

pub fn pid(&self) -> &i32

Source

pub fn comm(&self) -> &String

Source

pub fn state(&self) -> &char

Source

pub fn ppid(&self) -> &i32

Source

pub fn pgrp(&self) -> &i32

Source

pub fn session(&self) -> &i32

Source

pub fn tty_nr(&self) -> &i32

Source

pub fn tpgid(&self) -> &i32

Source

pub fn flags(&self) -> &u32

Source

pub fn minflt(&self) -> &u64

Source

pub fn cminflt(&self) -> &u64

Source

pub fn majflt(&self) -> &u64

Source

pub fn cmajflt(&self) -> &u64

Source

pub fn utime(&self) -> &u64

Source

pub fn stime(&self) -> &u64

Source

pub fn cutime(&self) -> &i64

Source

pub fn cstime(&self) -> &i64

Source

pub fn priority(&self) -> &i64

Source

pub fn nice(&self) -> &i64

Source

pub fn num_threads(&self) -> &i64

Source

pub fn itrealvalue(&self) -> &i64

Source

pub fn starttime(&self) -> &u128

Source

pub fn vsize(&self) -> &u64

Source

pub fn rss(&self) -> &i64

Source

pub fn rsslim(&self) -> &u64

Source

pub fn startcode(&self) -> &u64

Source

pub fn endcode(&self) -> &u64

Source

pub fn startstack(&self) -> &u64

Source

pub fn kstkesp(&self) -> &u64

Source

pub fn kstkeip(&self) -> &u64

Source

pub fn signal(&self) -> &u64

Source

pub fn blocked(&self) -> &u64

Source

pub fn sigignore(&self) -> &u64

Source

pub fn sigcatch(&self) -> &u64

Source

pub fn wchan(&self) -> &u64

Source

pub fn nswap(&self) -> &u64

Source

pub fn cnswap(&self) -> &u64

Source

pub fn exit_signal(&self) -> &i32

Source

pub fn processor(&self) -> &i32

Source

pub fn rt_priority(&self) -> &u32

Source

pub fn policy(&self) -> &u32

Source

pub fn delayacct_blkio_ticks(&self) -> &u128

Source

pub fn guest_time(&self) -> &u64

Source

pub fn cguest_time(&self) -> &i64

Source

pub fn start_data(&self) -> &Option<u64>

Source

pub fn end_data(&self) -> &Option<u64>

Source

pub fn start_brk(&self) -> &Option<u64>

Source

pub fn arg_start(&self) -> &Option<u64>

Source

pub fn arg_end(&self) -> &Option<u64>

Source

pub fn env_start(&self) -> &Option<u64>

Source

pub fn env_end(&self) -> &Option<u64>

Source

pub fn exit_code(&self) -> &Option<i32>

Trait Implementations§

Source§

impl Clone for StatP

Source§

fn clone(&self) -> StatP

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for StatP

Source§

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

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

impl FromStr for StatP

Source§

type Err = ProcErr

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<StatP, ProcErr>

Parses a string s to return a value of this type. Read more
Source§

impl PartialEq for StatP

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for StatP

Auto Trait Implementations§

§

impl Freeze for StatP

§

impl RefUnwindSafe for StatP

§

impl Send for StatP

§

impl Sync for StatP

§

impl Unpin for StatP

§

impl UnwindSafe for StatP

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.