Trait lockchain_core::traits::FileIO[][src]

pub trait FileIO: AutoEncoder {
    fn load(path: &str) -> Result<Self, Box<Error>> { ... }
fn save(&self, path: &str) -> Result<(), Box<Error>> { ... } }

An abstract file loading utility trait

Any type that implements FileIO also has to be AutoEncoder in order to be storable. This trait implements common file I/O operations, assuming that any type using it will then provide the required utility functions.

Provided Methods

Load a type from a file path

Store a type to a file path

Implementors