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:
Tom Alexander
2025-02-08 17:27:20 -05:00
parent 5cac44c625
commit 3867f965d2
5 changed files with 49 additions and 0 deletions

View 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(),
}
}
}