pub struct ProcessInfo { /* private fields */ }Expand description
Process info for a single PID.
Implementations§
Source§impl ProcessInfo
impl ProcessInfo
Sourcepub fn new(
comm: String,
cmd: String,
user: String,
ppid: u32,
tgid: u32,
start_time_ns: u64,
) -> Self
pub fn new( comm: String, cmd: String, user: String, ppid: u32, tgid: u32, start_time_ns: u64, ) -> Self
Create a new ProcessInfo.
Sourcepub fn comm(&self) -> &str
pub fn comm(&self) -> &str
Binary name from /proc/{pid}/comm (truncated to 15 chars).
Use this for process tree matching.
Sourcepub fn cmd(&self) -> &str
pub fn cmd(&self) -> &str
Full command line from /proc/{pid}/cmdline.
Use this for display/logging.
Sourcepub fn start_time_ns(&self) -> u64
pub fn start_time_ns(&self) -> u64
Process start time in nanoseconds since boot. Used for PID reuse detection.
Trait Implementations§
Source§impl Clone for ProcessInfo
impl Clone for ProcessInfo
Source§fn clone(&self) -> ProcessInfo
fn clone(&self) -> ProcessInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProcessInfo
impl Debug for ProcessInfo
Source§impl<'de> Deserialize<'de> for ProcessInfo
impl<'de> Deserialize<'de> for ProcessInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ProcessInfo
Source§impl PartialEq for ProcessInfo
impl PartialEq for ProcessInfo
Source§fn eq(&self, other: &ProcessInfo) -> bool
fn eq(&self, other: &ProcessInfo) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ProcessInfo
impl Serialize for ProcessInfo
impl StructuralPartialEq for ProcessInfo
Auto Trait Implementations§
impl Freeze for ProcessInfo
impl RefUnwindSafe for ProcessInfo
impl Send for ProcessInfo
impl Sync for ProcessInfo
impl Unpin for ProcessInfo
impl UnsafeUnpin for ProcessInfo
impl UnwindSafe for ProcessInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more