use super::config::Config; use super::printer::*; #[derive(Debug)] pub struct FileMatch { pub file_name: String, pub matches: Vec, } impl FileMatch { pub fn print(&self, config: &Config) { let cp = ColorPrinter { config, file_match: self, }; cp.print(); } } #[derive(Debug, Clone)] pub struct Match { pub line_number: usize, pub match_indexes: Vec, pub text: String, } #[derive(Debug, Clone)] pub struct MatchIndex { pub start: usize, pub end: usize, }