Skip to main content

Extractor

Trait Extractor 

Source
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§

Source

fn name(&self) -> &'static str

Source

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".

Implementors§