This commit is contained in:
23
docs/snippets/rust/metadata/pdf_only_processor.md
Normal file
23
docs/snippets/rust/metadata/pdf_only_processor.md
Normal file
@@ -0,0 +1,23 @@
|
||||
```rust title="Rust"
|
||||
impl PostProcessor for PdfOnlyProcessor {
|
||||
async fn process(
|
||||
&self,
|
||||
result: &mut ExtractionResult,
|
||||
_config: &ExtractionConfig
|
||||
) -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn processing_stage(&self) -> ProcessingStage {
|
||||
ProcessingStage::Middle
|
||||
}
|
||||
|
||||
fn should_process(
|
||||
&self,
|
||||
result: &ExtractionResult,
|
||||
_config: &ExtractionConfig
|
||||
) -> bool {
|
||||
result.mime_type == "application/pdf"
|
||||
}
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user