pub struct ProviderRegistry { /* private fields */ }Expand description
Lookup from provider id ("anthropic", "openai", …) to the Provider that serves it.
Implementations§
Source§impl ProviderRegistry
impl ProviderRegistry
Sourcepub fn new(
anthropic_base: impl Into<String>,
openai_base: impl Into<String>,
) -> Self
pub fn new( anthropic_base: impl Into<String>, openai_base: impl Into<String>, ) -> Self
Build the standard registry: Anthropic + OpenAI, sharing one HTTP client.
The enforce path is request/response (never streamed through the adapter), so the client carries a total request timeout as well as a connect timeout — a hung or slow upstream can’t pin a routing decision indefinitely. Falls back to a default client if the builder fails (only on TLS backend init, which is fatal anyway).
Trait Implementations§
Source§impl Clone for ProviderRegistry
impl Clone for ProviderRegistry
Source§fn clone(&self) -> ProviderRegistry
fn clone(&self) -> ProviderRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ProviderRegistry
impl !UnwindSafe for ProviderRegistry
impl Freeze for ProviderRegistry
impl Send for ProviderRegistry
impl Sync for ProviderRegistry
impl Unpin for ProviderRegistry
impl UnsafeUnpin for ProviderRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more