diff options
author | Matt Bradbury <[email protected]> | 2020-04-04 18:19:24 +0100 |
---|---|---|
committer | Matt Bradbury <[email protected]> | 2020-04-04 18:19:24 +0100 |
commit | 79f1ea075d0d3ad3514da7120faa1c3c5fd17bfc (patch) | |
tree | 79942c90aab8178b742fc167f82dd23ee42d9079 /fondant_deps | |
parent | c6de9f2552b9299f247485c44c1c66d0cd3b2012 (diff) |
Hack to make issue #1 sort of work
Diffstat (limited to 'fondant_deps')
-rw-r--r-- | fondant_deps/src/lib.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fondant_deps/src/lib.rs b/fondant_deps/src/lib.rs index 6f62ce8..9559b11 100644 --- a/fondant_deps/src/lib.rs +++ b/fondant_deps/src/lib.rs | |||
@@ -21,6 +21,8 @@ pub mod fondant_exports { | |||
21 | } | 21 | } |
22 | 22 | ||
23 | use serde::{de::DeserializeOwned, Serialize}; | 23 | use serde::{de::DeserializeOwned, Serialize}; |
24 | use std::path::PathBuf; | ||
25 | |||
24 | #[derive(Debug)] | 26 | #[derive(Debug)] |
25 | /// Errors that `load` and `store` can result in | 27 | /// Errors that `load` and `store` can result in |
26 | pub enum FondantError { | 28 | pub enum FondantError { |
@@ -42,6 +44,9 @@ pub enum FondantError { | |||
42 | 44 | ||
43 | /// Derive this trait on a struct to mark it as a 'configuration' struct. | 45 | /// Derive this trait on a struct to mark it as a 'configuration' struct. |
44 | pub trait Configure: Serialize + DeserializeOwned + Default { | 46 | pub trait Configure: Serialize + DeserializeOwned + Default { |
47 | fn load_file(config_file: &PathBuf) -> Result<Self, FondantError>; | ||
45 | fn load() -> Result<Self, FondantError>; | 48 | fn load() -> Result<Self, FondantError>; |
46 | fn store(&self) -> Result<(), FondantError>; | 49 | fn store(&self) -> Result<(), FondantError>; |
50 | fn store_file(&self, config_file: &PathBuf) -> Result<(), FondantError>; | ||
51 | |||
47 | } | 52 | } |