summaryrefslogtreecommitdiffstats
path: root/src/file/source/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/file/source/mod.rs')
-rw-r--r--src/file/source/mod.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/file/source/mod.rs b/src/file/source/mod.rs
index 3b42a55..4a8877b 100644
--- a/src/file/source/mod.rs
+++ b/src/file/source/mod.rs
@@ -4,12 +4,15 @@ pub mod string;
use std::error::Error;
use std::fmt::Debug;
-use crate::file::FileFormat;
+use crate::{file::FileExtensions, Format};
/// Describes where the file is sourced
-pub trait FileSource: Debug + Clone {
+pub trait FileSource<T>: Debug + Clone
+where
+ T: Format + FileExtensions,
+{
fn resolve(
&self,
- format_hint: Option<FileFormat>,
- ) -> Result<(Option<String>, String, FileFormat), Box<dyn Error + Send + Sync>>;
+ format_hint: Option<T>,
+ ) -> Result<(Option<String>, String, Box<dyn Format>), Box<dyn Error + Send + Sync>>;
}