pub struct HttpBackendConfig {
pub base_url: String,
pub api_key: Option<String>,
pub extra_headers: BTreeMap<String, String>,
pub extra_body: BTreeMap<String, Value>,
pub max_retries: u32,
}Expand description
Shared HTTP configuration for one upstream backend.
Fields§
§base_url: StringBase URL of the provider API (e.g. https://api.openai.com/v1).
api_key: Option<String>API key for the provider, loaded by the caller. None sends no auth.
extra_headers: BTreeMap<String, String>Static headers added to every outbound call to this backend.
extra_body: BTreeMap<String, Value>Default top-level request fields, applied only when the request omits the key.
max_retries: u32Additional attempts after the initial upstream request.
Trait Implementations§
Source§impl Clone for HttpBackendConfig
impl Clone for HttpBackendConfig
Source§fn clone(&self) -> HttpBackendConfig
fn clone(&self) -> HttpBackendConfig
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 Freeze for HttpBackendConfig
impl RefUnwindSafe for HttpBackendConfig
impl Send for HttpBackendConfig
impl Sync for HttpBackendConfig
impl Unpin for HttpBackendConfig
impl UnsafeUnpin for HttpBackendConfig
impl UnwindSafe for HttpBackendConfig
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