pub trait Extractor: Send + Sync {
// Required methods
fn extract<'life0, 'life1, 'async_trait>(
&'life0 self,
source: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ExtractResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn extract_sanitized<'life0, 'life1, 'async_trait>(
&'life0 self,
source: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ExtractResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Common trait for all extractors
Required Methods§
Sourcefn extract<'life0, 'life1, 'async_trait>(
&'life0 self,
source: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ExtractResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn extract<'life0, 'life1, 'async_trait>(
&'life0 self,
source: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ExtractResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Extract text content from the given source
Sourcefn extract_sanitized<'life0, 'life1, 'async_trait>(
&'life0 self,
source: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ExtractResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn extract_sanitized<'life0, 'life1, 'async_trait>(
&'life0 self,
source: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ExtractResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Extract and sanitize content