pub struct ProviderEntry {
pub adapter: Option<String>,
pub api_key_env: Option<String>,
pub api_key: Option<String>,
pub base_url: Option<String>,
pub project_id: Option<String>,
pub location: Option<String>,
}Expand description
One entry of the [providers.<id>] table (PSP-9 system 1).
A provider record describes resolution policy, not embedded secrets:
api_key_env names an environment variable; a literal api_key is
accepted for local development but masked on display. Vertex entries may
omit a static key entirely and use the per-request ADC token resolver.
Fields§
§adapter: Option<String>genai adapter kind. Defaults to the table key, so
[providers.anthropic] needs no explicit adapter while
[providers.local] can say adapter = "ollama".
api_key_env: Option<String>Environment variable holding the API key.
api_key: Option<String>Literal API key. Prefer api_key_env.
base_url: Option<String>Base URL override for OpenAI-compatible / local endpoints.
project_id: Option<String>Google Cloud project id (Vertex only; ADC discovery when absent).
location: Option<String>Vertex location; defaults to global via the existing resolver.
Implementations§
Source§impl ProviderEntry
impl ProviderEntry
Sourcepub fn adapter_or<'a>(&'a self, key: &'a str) -> &'a str
pub fn adapter_or<'a>(&'a self, key: &'a str) -> &'a str
The adapter this entry binds, defaulting to the table key.
Trait Implementations§
Source§impl Clone for ProviderEntry
impl Clone for ProviderEntry
Source§fn clone(&self) -> ProviderEntry
fn clone(&self) -> ProviderEntry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProviderEntry
impl Debug for ProviderEntry
Source§impl Default for ProviderEntry
impl Default for ProviderEntry
Source§fn default() -> ProviderEntry
fn default() -> ProviderEntry
Source§impl<'de> Deserialize<'de> for ProviderEntrywhere
ProviderEntry: Default,
impl<'de> Deserialize<'de> for ProviderEntrywhere
ProviderEntry: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ProviderEntry
impl RefUnwindSafe for ProviderEntry
impl Send for ProviderEntry
impl Sync for ProviderEntry
impl Unpin for ProviderEntry
impl UnsafeUnpin for ProviderEntry
impl UnwindSafe for ProviderEntry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.