Skip to main content

assay_sim/
corpus.rs

1use anyhow::Result;
2use std::path::{Path, PathBuf};
3
4pub enum CorpusCategory {
5    Valid,
6    Invalid,
7    Crash,
8}
9
10pub struct Corpus {
11    pub root: PathBuf,
12}
13
14impl Corpus {
15    pub fn new(root: impl Into<PathBuf>) -> Self {
16        Self { root: root.into() }
17    }
18
19    pub fn load_valid(&self) -> Result<Vec<PathBuf>> {
20        // Placeholder: walkdir self.root/valid
21        Ok(Vec::new())
22    }
23
24    pub fn add(&self, _path: &Path, _category: CorpusCategory, _reason: &str) -> Result<()> {
25        // Copy to root/category/hash
26        Ok(())
27    }
28}