This commit is contained in:
11
docs/snippets/rust/plugins/extractor_registration.md
Normal file
11
docs/snippets/rust/plugins/extractor_registration.md
Normal file
@@ -0,0 +1,11 @@
|
||||
```rust title="Rust"
|
||||
use kreuzberg::plugins::registry::get_document_extractor_registry;
|
||||
use std::sync::Arc;
|
||||
|
||||
fn register_custom_extractor() -> kreuzberg::Result<()> {
|
||||
let extractor = Arc::new(CustomJsonExtractor);
|
||||
let registry = get_document_extractor_registry();
|
||||
registry.write().unwrap().register(extractor)?;
|
||||
Ok(())
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user