Trait FromRead

Source
pub trait FromRead: Sized {
    // Required method
    fn from_read<R: Read>(r: R) -> ProcResult<Self>;

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

Types which can be parsed from a Read implementation.

Required Methods§

Source

fn from_read<R: Read>(r: R) -> ProcResult<Self>

Read the type from a Read.

Provided Methods§

Source

fn from_file<P: AsRef<Path>>(path: P) -> ProcResult<Self>

Read the type from a file.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§