use std::future::Future;
use std::pin::Pin;
use crate::error::Result;
use crate::types::RemoteSkill;
pub type BoxFuture<'a, T> = Pin<Box<dyn Future<Output = T> + Send + 'a>>;
pub trait HostProvider: Send + Sync + std::fmt::Debug {
fn id(&self) -> &str;
fn display_name(&self) -> &str;
fn matches_url(&self, url: &str) -> Option<String>;
fn fetch_skill<'a>(&'a self, url: &'a str) -> BoxFuture<'a, Result<Option<RemoteSkill>>>;
fn to_raw_url(&self, url: &str) -> String;
fn source_identifier(&self, url: &str) -> String;
}