aboutsummaryrefslogtreecommitdiff
path: root/fondant_deps/src
diff options
context:
space:
mode:
Diffstat (limited to 'fondant_deps/src')
-rw-r--r--fondant_deps/src/lib.rs5
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
23use serde::{de::DeserializeOwned, Serialize}; 23use serde::{de::DeserializeOwned, Serialize};
24use 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
26pub enum FondantError { 28pub 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.
44pub trait Configure: Serialize + DeserializeOwned + Default { 46pub 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}