Trait procfs::FromRead

source ·
pub trait FromRead: Sized {
    // Required method
    fn from_read<R>(r: R) -> Result<Self, ProcError>
       where R: Read;

    // Provided method
    fn from_file<P>(path: P) -> Result<Self, ProcError>
       where P: AsRef<Path> { ... }
}
Expand description

Types which can be parsed from a Read implementation.

Required Methods§

source

fn from_read<R>(r: R) -> Result<Self, ProcError>where R: Read,

Read the type from a Read.

Provided Methods§

source

fn from_file<P>(path: P) -> Result<Self, ProcError>where P: AsRef<Path>,

Read the type from a file.

Object Safety§

This trait is not object safe.

Implementors§