Skip to main content

ProcessExt

Trait ProcessExt 

Source
pub trait ProcessExt {
    // Required methods
    fn io_counters(&self) -> BoxFuture<'_, ProcessResult<IoCounters>>;
    fn net_io_counters(&self) -> BoxStream<'_, ProcessResult<IoCounters>>;
}
Expand description

Linux-specific extension to Process

Required Methods§

Source

fn io_counters(&self) -> BoxFuture<'_, ProcessResult<IoCounters>>

Returns future which resolves into process IO counters.

Since -> impl Trait is not allowed yet in the trait methods, this method returns boxed Future. This behavior will change later.

Source

fn net_io_counters(&self) -> BoxStream<'_, ProcessResult<IoCounters>>

Returns stream which yield this process IO counters for each network interface.

Since -> impl Trait is not allowed yet in the trait methods, this method returns boxed Stream. This behavior will change later.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl ProcessExt for Process

Available on Linux only.