use async_trait::async_trait;
use crw_core::error::CrwResult;
use crw_core::types::FetchResult;
#[async_trait]
pub trait PageFetcher: Send + Sync {
async fn fetch(
&self,
url: &str,
headers: &std::collections::HashMap<String, String>,
wait_for_ms: Option<u64>,
) -> CrwResult<FetchResult>;
fn name(&self) -> &str;
fn supports_js(&self) -> bool;
async fn is_available(&self) -> bool;
}