pub trait Provider: Sized {
type Builder: ProviderBuilder;
const VERIFY_PATH: &'static str;
// Required method
fn build<H>(
builder: &ClientBuilder<Self::Builder, <Self::Builder as ProviderBuilder>::ApiKey, H>,
) -> Result<Self>;
// Provided methods
fn build_uri(
&self,
base_url: &str,
path: &str,
_transport: Transport,
) -> String { ... }
fn with_custom(&self, req: Builder) -> Result<Builder> { ... }
}Expand description
An API provider extension, this abstracts over extensions which may be use in conjunction with
the Client<Ext, H> struct to define the behavior of a provider with respect to networking,
auth, instantiating models
Required Associated Constants§
const VERIFY_PATH: &'static str
Required Associated Types§
type Builder: ProviderBuilder
Required Methods§
fn build<H>( builder: &ClientBuilder<Self::Builder, <Self::Builder as ProviderBuilder>::ApiKey, H>, ) -> Result<Self>
Provided Methods§
fn build_uri(&self, base_url: &str, path: &str, _transport: Transport) -> String
fn with_custom(&self, req: Builder) -> Result<Builder>
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.