pub trait BacklinkAdapter: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn fetch_backlinks<'life0, 'life1, 'async_trait>(
&'life0 self,
domain: &'life1 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<ExternalBacklink>, AdapterError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_domain_rating<'life0, 'life1, 'async_trait>(
&'life0 self,
domain: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<f64, AdapterError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn is_available(&self) -> bool;
}Expand description
External backlink data source adapter trait.
All backlink providers (Ahrefs, Majestic, GSC) implement this trait.
Required Methods§
Sourcefn fetch_backlinks<'life0, 'life1, 'async_trait>(
&'life0 self,
domain: &'life1 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<ExternalBacklink>, AdapterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fetch_backlinks<'life0, 'life1, 'async_trait>(
&'life0 self,
domain: &'life1 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<ExternalBacklink>, AdapterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn get_domain_rating<'life0, 'life1, 'async_trait>(
&'life0 self,
domain: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<f64, AdapterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_domain_rating<'life0, 'life1, 'async_trait>(
&'life0 self,
domain: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<f64, AdapterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn is_available(&self) -> bool
fn is_available(&self) -> bool
Check if adapter is configured and available.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".