pub trait FileAnalyzer: Send + Sync {
// Required methods
fn analyze_file<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
file_path: &'life1 Path,
config: &'life2 Config,
) -> Pin<Box<dyn Future<Output = Result<FileInfo>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn analyze_content<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
file_info: &'life1 mut FileInfo,
config: &'life2 Config,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn name(&self) -> &'static str;
fn version(&self) -> &'static str;
// Provided method
fn analyze_batch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
files: Vec<&'life1 Path>,
config: &'life2 Config,
) -> Pin<Box<dyn Future<Output = Result<Vec<FileInfo>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
}
Expand description
Core trait for file analysis implementations
Required Methods§
Sourcefn analyze_file<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
file_path: &'life1 Path,
config: &'life2 Config,
) -> Pin<Box<dyn Future<Output = Result<FileInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn analyze_file<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
file_path: &'life1 Path,
config: &'life2 Config,
) -> Pin<Box<dyn Future<Output = Result<FileInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Analyze a single file and return metadata
Sourcefn analyze_content<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
file_info: &'life1 mut FileInfo,
config: &'life2 Config,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn analyze_content<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
file_info: &'life1 mut FileInfo,
config: &'life2 Config,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Load and analyze file content
Provided Methods§
Sourcefn analyze_batch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
files: Vec<&'life1 Path>,
config: &'life2 Config,
) -> Pin<Box<dyn Future<Output = Result<Vec<FileInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn analyze_batch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
files: Vec<&'life1 Path>,
config: &'life2 Config,
) -> Pin<Box<dyn Future<Output = Result<Vec<FileInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Batch analyze multiple files for efficiency