pub struct Strategy {} use std::path::PathBuf; use crate::file_handler::{File, FileType, FileHandlerStrategy}; impl FileHandlerStrategy for Strategy { fn is(&self, path: &PathBuf) -> bool { !path.is_dir() } fn identify(&self) -> FileType { FileType::File } fn can_handle(&self, file_type: &FileType) -> bool { match file_type { FileType::File => true, _ => false, } } fn handle(&self, file: &File) { println!("Should copy {}", file.path.display()) } }