pub trait ProviderBuilder:
Sized
+ Default
+ Clone {
type Extension<H>: Provider
where H: HttpClientExt;
type ApiKey: ApiKey;
const BASE_URL: &'static str;
// Required method
fn build<H>(
builder: &ClientBuilder<Self, Self::ApiKey, H>,
) -> Result<Self::Extension<H>>
where H: HttpClientExt;
// Provided method
fn finish<H>(
&self,
builder: ClientBuilder<Self, Self::ApiKey, H>,
) -> Result<ClientBuilder<Self, Self::ApiKey, H>> { ... }
}Expand description
An API provider extension builder, this abstracts over provider-specific builders which are able to configure and produce a given provider’s extension type
See Provider
Required Associated Constants§
Required Associated Types§
Required Methods§
Sourcefn build<H>(
builder: &ClientBuilder<Self, Self::ApiKey, H>,
) -> Result<Self::Extension<H>>where
H: HttpClientExt,
fn build<H>(
builder: &ClientBuilder<Self, Self::ApiKey, H>,
) -> Result<Self::Extension<H>>where
H: HttpClientExt,
Build the provider extension from the client builder configuration.
Provided Methods§
Sourcefn finish<H>(
&self,
builder: ClientBuilder<Self, Self::ApiKey, H>,
) -> Result<ClientBuilder<Self, Self::ApiKey, H>>
fn finish<H>( &self, builder: ClientBuilder<Self, Self::ApiKey, H>, ) -> Result<ClientBuilder<Self, Self::ApiKey, H>>
This method can be used to customize the fields of builder before it is used to create
a client. For example, adding default headers
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.