Introduce a file access interface for reading additional files.

This commit is contained in:
Tom Alexander
2023-09-04 13:00:41 -04:00
parent a8f277efe5
commit da1ce2717d
3 changed files with 21 additions and 1 deletions

View File

@@ -1,16 +1,20 @@
use super::FileAccessInterface;
use super::LocalFileAccessInterface;
use crate::types::Object;
// TODO: Ultimately, I think we'll need most of this: https://orgmode.org/manual/In_002dbuffer-Settings.html
#[derive(Debug, Clone)]
pub struct GlobalSettings<'g, 's> {
pub struct GlobalSettings<'g, 's, F: FileAccessInterface> {
pub radio_targets: Vec<&'g Vec<Object<'s>>>,
pub file_access: F,
}
impl<'g, 's> GlobalSettings<'g, 's> {
pub fn new() -> Self {
GlobalSettings {
radio_targets: Vec::new(),
file_access: LocalFileAccessInterface,
}
}
}