pub trait Extractor: Send + Sync {
// Required methods
fn name(&self) -> &'static str;
fn extract(&self, body: &str) -> Result<ExtractionResult, AppError>;
}Expand description
Trait abstraction for any extractor. The LLM backend and the GLiNER backend (ner-legacy) both implement it.
Required Methods§
fn name(&self) -> &'static str
fn extract(&self, body: &str) -> Result<ExtractionResult, AppError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".