Trait procfs::FromReadSI

source ·
pub trait FromReadSI: Sized {
    // Required method
    fn from_read<R>(
        r: R,
        system_info: &(dyn SystemInfoInterface + 'static)
    ) -> Result<Self, ProcError>
       where R: Read;

    // Provided method
    fn from_file<P>(
        path: P,
        system_info: &(dyn SystemInfoInterface + 'static)
    ) -> Result<Self, ProcError>
       where P: AsRef<Path> { ... }
}
Expand description

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

Required Methods§

source

fn from_read<R>( r: R, system_info: &(dyn SystemInfoInterface + 'static) ) -> Result<Self, ProcError>where R: Read,

Parse the type from a Read and system info.

Provided Methods§

source

fn from_file<P>( path: P, system_info: &(dyn SystemInfoInterface + 'static) ) -> Result<Self, ProcError>where P: AsRef<Path>,

Parse the type from a file.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> FromReadSI for Twhere T: FromBufReadSI,