Trait Format

Source
pub trait Format {
    // Required method
    fn read<T>(&mut self, path: &Path) -> Result<Module<T>, Error>
       where T: DeserializeOwned;
}
Expand description

The format of a file.

The job of a Format is to read a file, parse it and convert it to a Module so it can be merged.

Required Methods§

Source

fn read<T>(&mut self, path: &Path) -> Result<Module<T>, Error>

Read the module at path.

See trait-level docs for more information.

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§

Source§

impl Format for Json

Available on crate feature json only.
Source§

impl Format for Toml

Available on crate feature toml only.
Source§

impl Format for Yaml

Available on crate feature yaml only.