Skip to main content

Load

Trait Load 

Source
pub trait Load: Sized {
    // Required method
    fn load(reader: &mut impl BufRead) -> Result<Self>;

    // Provided method
    fn load_from_path(path: impl AsRef<Path>) -> Result<Self> { ... }
}
Expand description

Trait to provide functionality to load things from reader.

Required Methods§

Source

fn load(reader: &mut impl BufRead) -> Result<Self>

Loads things from reader.

Provided Methods§

Source

fn load_from_path(path: impl AsRef<Path>) -> Result<Self>

Loads things from file specified as a path.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§