pub trait Provider {
// Required method
fn send_async<'life0, 'life1, 'life2, 'async_trait>(
url: &'life0 str,
action: &'life1 str,
body: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<String, RequestError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}
Expand description
Trait to allow abstracting over tokio
and async-std
.
Required Methods§
Sourcefn send_async<'life0, 'life1, 'life2, 'async_trait>(
url: &'life0 str,
action: &'life1 str,
body: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<String, RequestError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn send_async<'life0, 'life1, 'life2, 'async_trait>(
url: &'life0 str,
action: &'life1 str,
body: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<String, RequestError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Send an async request over the executor.
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.