pub trait LinkExtractor: Send + Sync {
// Required methods
fn extract<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
) -> Pin<Box<dyn Future<Output = PunchResult<LinkContent>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn supports_url(&self, url: &str) -> bool;
}Expand description
Trait for link extraction backends — the scout unit that infiltrates URLs.
Required Methods§
Sourcefn extract<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
) -> Pin<Box<dyn Future<Output = PunchResult<LinkContent>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn extract<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
) -> Pin<Box<dyn Future<Output = PunchResult<LinkContent>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Extract content from the given URL.
Sourcefn supports_url(&self, url: &str) -> bool
fn supports_url(&self, url: &str) -> bool
Check if this extractor supports the given URL.