summaryrefslogtreecommitdiffstats
path: root/src/file/source/mod.rs
blob: 4a8877b7dc13f3eb3c58e8f2de6e537d03328559 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
pub mod file;
pub mod string;

use std::error::Error;
use std::fmt::Debug;

use crate::{file::FileExtensions, Format};

/// Describes where the file is sourced
pub trait FileSource<T>: Debug + Clone
where
    T: Format + FileExtensions,
{
    fn resolve(
        &self,
        format_hint: Option<T>,
    ) -> Result<(Option<String>, String, Box<dyn Format>), Box<dyn Error + Send + Sync>>;
}