Skip to main content

JsonProviderType

Trait JsonProviderType 

Source
pub trait JsonProviderType<T: Target>: ProviderType<T> {
    // Required method
    fn request_json<U: DeserializeOwned>(
        &self,
        target: T,
    ) -> impl Future<Output = Result<U, Error>>;
}

Required Methods§

Source

fn request_json<U: DeserializeOwned>( &self, target: T, ) -> impl Future<Output = Result<U, Error>>

request and deserialize response to json using serde

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T> JsonProviderType<T> for Provider<T>
where T: Target + Send,