Skip to main content

Module provider

Module provider 

Source
Expand description

Send a generated client to another provider of the same API: ProviderLayer moves each request to the provider’s base URL and adds the headers, query parameters and path changes the provider needs.

The layer is provider-neutral: it knows no provider by name. A crate for one API (OpenAI-compatible providers, for example) builds its presets on it.

Structs§

Provider
The service of a ProviderLayer.
ProviderLayer
A tower layer that sends requests to a provider: another host (and path prefix) serving the same API, with its own headers, query parameters and paths.