From f1f564dfcd328a1b36e6fefb37e023afebc9d68f Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 12 Apr 2020 12:11:02 +0530 Subject: all loading paths at runtime --- fondant_deps/src/lib.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'fondant_deps') diff --git a/fondant_deps/src/lib.rs b/fondant_deps/src/lib.rs index 9559b11..82626b7 100644 --- a/fondant_deps/src/lib.rs +++ b/fondant_deps/src/lib.rs @@ -21,7 +21,7 @@ pub mod fondant_exports { } use serde::{de::DeserializeOwned, Serialize}; -use std::path::PathBuf; +use std::path::{Path, PathBuf}; #[derive(Debug)] /// Errors that `load` and `store` can result in @@ -44,9 +44,8 @@ pub enum FondantError { /// Derive this trait on a struct to mark it as a 'configuration' struct. pub trait Configure: Serialize + DeserializeOwned + Default { - fn load_file(config_file: &PathBuf) -> Result; + fn load_file>(config_file: P) -> Result; fn load() -> Result; fn store(&self) -> Result<(), FondantError>; - fn store_file(&self, config_file: &PathBuf) -> Result<(), FondantError>; - + fn store_file>(&self, config_file: P) -> Result<(), FondantError>; } -- cgit v1.2.3