use super::client::Client;
use async_trait::async_trait;
use http::Uri;
use url::Url;
pub fn url_to_http_uri(url: Url) -> Uri {
url.as_str()
.parse::<Uri>()
.expect("failed to parse a url::Url as an http::Uri")
}
#[async_trait]
pub trait Query<T, C>
where
C: Client,
{
async fn query(&self, client: &C) -> anyhow::Result<T>;
}