pub trait ClientSync {
// Required methods
fn spawn<F: Future<Output = ()> + Send + 'static>(&self, fut: F);
fn fetch(
&self,
url: &str,
headers: &HashMap<String, String>,
) -> Pin<Box<dyn Send + Future<Output = Result<Resp, String>>>>;
}
Required Methods§
fn spawn<F: Future<Output = ()> + Send + 'static>(&self, fut: F)
fn fetch( &self, url: &str, headers: &HashMap<String, String>, ) -> Pin<Box<dyn Send + Future<Output = Result<Resp, String>>>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.