lsp_core::prelude

Trait ClientSync

Source
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§

Source

fn spawn<F: Future<Output = ()> + Send + 'static>(&self, fut: F)

Source

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.

Implementors§