Skip to main content

load_from_disk

Function load_from_disk 

Source
pub fn load_from_disk<T>(metadata: &Path, dir: &Path) -> Result<T>
where T: for<'a> Loadable<'a>,
Expand description

Reload a value previously written by save::save_to_disk.

metadata is the manifest JSON path produced by the saver, and dir is the directory holding any side-car artifacts.

ยงErrors

Returns Error if the manifest is missing or malformed, if a referenced artifact is missing, or if a user Load impl fails (e.g. due to a version mismatch with no upgrade path).