File

Trait File 

Source
pub trait File<T>{
    // Provided methods
    fn load(path: &Path) -> Result<T> { ... }
    fn write(&self, path: &Path) -> Result<()>
       where Self: Serialize { ... }
}

Provided Methods§

Source

fn load(path: &Path) -> Result<T>

Reads file from filesystem. It must be json or yaml.

Source

fn write(&self, path: &Path) -> Result<()>
where Self: Serialize,

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§