Trait ReadFrom

Source
pub trait ReadFrom {
    // Required method
    fn read_from(path: &Path) -> Result<Self>
       where Self: Sized;
}
Expand description

Trait for types / structures that can be read from disk, either from a file or a directory.

Required Methods§

Source

fn read_from(path: &Path) -> Result<Self>
where Self: Sized,

Reads the structure from the specified path, which can be either a file or a directory.

Implementations on Foreign Types§

Source§

impl ReadFrom for String

Source§

fn read_from(path: &Path) -> Result<Self>
where Self: Sized,

Source§

impl ReadFrom for Vec<u8>

Source§

fn read_from(path: &Path) -> Result<Self>
where Self: Sized,

Source§

impl<T> ReadFrom for Option<T>
where T: ReadFrom,

Source§

fn read_from(path: &Path) -> Result<Self>
where Self: Sized,

Implementors§