pub trait FileProcessorService: Send + Sync {
// Required methods
fn process_file<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
input_path: &'life1 Path,
output_path: Option<&'life2 Path>,
processor: Box<dyn ChunkProcessor>,
) -> Pin<Box<dyn Future<Output = Result<FileProcessingResult, PipelineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn process_files_batch<'life0, 'async_trait>(
&'life0 self,
file_pairs: Vec<(PathBuf, Option<PathBuf>)>,
processor: Box<dyn ChunkProcessor>,
) -> Pin<Box<dyn Future<Output = Result<Vec<FileProcessingResult>, PipelineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn process_file_in_place<'life0, 'life1, 'async_trait>(
&'life0 self,
file_path: &'life1 Path,
processor: Box<dyn ChunkProcessor>,
) -> Pin<Box<dyn Future<Output = Result<FileProcessingResult, PipelineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn validate_file_before_processing<'life0, 'life1, 'async_trait>(
&'life0 self,
file_path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<bool, PipelineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_processing_stats(&self) -> FileProcessingStats;
fn reset_processing_stats(&mut self);
fn get_config(&self) -> FileProcessorConfig;
fn update_config(&mut self, config: FileProcessorConfig);
}Expand description
Trait for processing files with the pipeline system
Required Methods§
Sourcefn process_file<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
input_path: &'life1 Path,
output_path: Option<&'life2 Path>,
processor: Box<dyn ChunkProcessor>,
) -> Pin<Box<dyn Future<Output = Result<FileProcessingResult, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn process_file<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
input_path: &'life1 Path,
output_path: Option<&'life2 Path>,
processor: Box<dyn ChunkProcessor>,
) -> Pin<Box<dyn Future<Output = Result<FileProcessingResult, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Processes a single file through the pipeline
Sourcefn process_files_batch<'life0, 'async_trait>(
&'life0 self,
file_pairs: Vec<(PathBuf, Option<PathBuf>)>,
processor: Box<dyn ChunkProcessor>,
) -> Pin<Box<dyn Future<Output = Result<Vec<FileProcessingResult>, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn process_files_batch<'life0, 'async_trait>(
&'life0 self,
file_pairs: Vec<(PathBuf, Option<PathBuf>)>,
processor: Box<dyn ChunkProcessor>,
) -> Pin<Box<dyn Future<Output = Result<Vec<FileProcessingResult>, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Processes multiple files concurrently
Sourcefn process_file_in_place<'life0, 'life1, 'async_trait>(
&'life0 self,
file_path: &'life1 Path,
processor: Box<dyn ChunkProcessor>,
) -> Pin<Box<dyn Future<Output = Result<FileProcessingResult, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn process_file_in_place<'life0, 'life1, 'async_trait>(
&'life0 self,
file_path: &'life1 Path,
processor: Box<dyn ChunkProcessor>,
) -> Pin<Box<dyn Future<Output = Result<FileProcessingResult, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Processes a file in-place (modifying the original)
Sourcefn validate_file_before_processing<'life0, 'life1, 'async_trait>(
&'life0 self,
file_path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<bool, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn validate_file_before_processing<'life0, 'life1, 'async_trait>(
&'life0 self,
file_path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<bool, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Validates file integrity before processing
Sourcefn get_processing_stats(&self) -> FileProcessingStats
fn get_processing_stats(&self) -> FileProcessingStats
Gets processing statistics
Sourcefn reset_processing_stats(&mut self)
fn reset_processing_stats(&mut self)
Resets processing statistics
Sourcefn get_config(&self) -> FileProcessorConfig
fn get_config(&self) -> FileProcessorConfig
Gets the current configuration
Sourcefn update_config(&mut self, config: FileProcessorConfig)
fn update_config(&mut self, config: FileProcessorConfig)
Updates the configuration