procfs_core

Trait FromReadSI

source
pub trait FromReadSI: Sized {
    // Required method
    fn from_read<R: Read>(r: R, system_info: &SystemInfo) -> ProcResult<Self>;

    // Provided method
    fn from_file<P: AsRef<Path>>(
        path: P,
        system_info: &SystemInfo,
    ) -> ProcResult<Self> { ... }
}
Expand description

Types which can be parsed from a Read implementation and system info.

Required Methods§

source

fn from_read<R: Read>(r: R, system_info: &SystemInfo) -> ProcResult<Self>

Parse the type from a Read and system info.

Provided Methods§

source

fn from_file<P: AsRef<Path>>( path: P, system_info: &SystemInfo, ) -> ProcResult<Self>

Parse the type from a file.

Object Safety§

This trait is not object safe.

Implementors§