Trait sysinfo::PidExt

source ·
pub trait PidExt:
    Copy
    + From<usize>
    + FromStr
    + Display {
    // Required methods
    fn as_u32(self) -> u32;
    fn from_u32(v: u32) -> Self;
}
Expand description

Trait to have a common conversions for the Pid type.

use sysinfo::{Pid, PidExt};

let p = Pid::from_u32(0);
let value: u32 = p.as_u32();

Required Methods§

source

fn as_u32(self) -> u32

Allows to convert Pid into u32.

use sysinfo::{Pid, PidExt};

let p = Pid::from_u32(0);
let value: u32 = p.as_u32();
source

fn from_u32(v: u32) -> Self

Allows to convert a u32 into Pid.

use sysinfo::{Pid, PidExt};

let p = Pid::from_u32(0);

Object Safety§

This trait is not object safe.

Implementors§