Add a dependency manager for render-time actions.
This will be used for supporting things like copying static files or rendering code blocks like gnuplot or graphviz.
This commit is contained in:
19
src/context/dependency_manager.rs
Normal file
19
src/context/dependency_manager.rs
Normal file
@@ -0,0 +1,19 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
pub(crate) type RefDependencyManager = std::sync::Arc<std::sync::Mutex<DependencyManager>>;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub(crate) struct DependencyManager {
|
||||
/// A stack of paths for the files being visited.
|
||||
///
|
||||
/// The last entry is the current file being processed. This can be used for handling relative-path links.
|
||||
file_stack: Vec<PathBuf>,
|
||||
}
|
||||
|
||||
impl DependencyManager {
|
||||
pub(crate) fn new() -> Self {
|
||||
DependencyManager {
|
||||
file_stack: Vec::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user