nargo_document/generator/static_.rs
1//! 静态资源处理模块
2//! 提供文档站点所需静态资源的处理和复制功能
3
4use std::result::Result;
5
6/// 静态资源处理器
7#[derive(Clone)]
8pub struct StaticProcessor;
9
10impl StaticProcessor {
11 /// 创建新的静态资源处理器
12 ///
13 /// # 返回值
14 /// 返回一个新的静态资源处理器实例
15 pub fn new() -> Self {
16 Self
17 }
18
19 /// 处理静态资源
20 ///
21 /// # 返回值
22 /// 返回包含静态资源名称和内容的元组向量
23 pub fn process(&self) -> Vec<(String, String)> {
24 Vec::new()
25 }
26
27 /// 复制静态文件
28 ///
29 /// # 参数
30 /// * `_input_dir` - 输入目录
31 /// * `_output_dir` - 输出目录
32 ///
33 /// # 返回值
34 /// 返回 Result,成功时为 (),失败时为错误信息
35 pub fn copy_static_files(&self, _input_dir: &String, _output_dir: &String) -> Result<(), std::io::Error> {
36 Ok(())
37 }
38}
39
40impl Default for StaticProcessor {
41 fn default() -> Self {
42 Self::new()
43 }
44}