pub struct ProcReader;Expand description
/proc 读取器
Implementations§
Source§impl ProcReader
impl ProcReader
Sourcepub fn scan_all() -> Vec<ProcSnapshot>
pub fn scan_all() -> Vec<ProcSnapshot>
扫描所有进程, 返回当前快照列表
遍历 /proc/[0-9]*/ 目录, 读取每个进程的状态。
Sourcepub fn to_event(snapshot: &ProcSnapshot, timestamp_ms: i64) -> ProcStateEvent
pub fn to_event(snapshot: &ProcSnapshot, timestamp_ms: i64) -> ProcStateEvent
将 ProcSnapshot 转换为 aios-spec 的 ProcStateEvent
Auto Trait Implementations§
impl Freeze for ProcReader
impl RefUnwindSafe for ProcReader
impl Send for ProcReader
impl Sync for ProcReader
impl Unpin for ProcReader
impl UnsafeUnpin for ProcReader
impl UnwindSafe for ProcReader
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