pub struct ApiKeySources {
pub gemini_env: String,
pub anthropic_env: String,
pub openai_env: String,
pub openrouter_env: String,
pub xai_env: String,
pub gemini_config: Option<String>,
pub anthropic_config: Option<String>,
pub openai_config: Option<String>,
pub openrouter_config: Option<String>,
pub xai_config: Option<String>,
}
Expand description
API key sources for different providers
Fields§
§gemini_env: String
Gemini API key environment variable name
anthropic_env: String
Anthropic API key environment variable name
openai_env: String
OpenAI API key environment variable name
openrouter_env: String
OpenRouter API key environment variable name
xai_env: String
xAI API key environment variable name
gemini_config: Option<String>
Gemini API key from configuration file
anthropic_config: Option<String>
Anthropic API key from configuration file
openai_config: Option<String>
OpenAI API key from configuration file
openrouter_config: Option<String>
OpenRouter API key from configuration file
xai_config: Option<String>
xAI API key from configuration file
Implementations§
Source§impl ApiKeySources
impl ApiKeySources
Sourcepub fn for_provider(provider: &str) -> Self
pub fn for_provider(provider: &str) -> Self
Create API key sources for a specific provider with automatic environment variable inference
Trait Implementations§
Source§impl Clone for ApiKeySources
impl Clone for ApiKeySources
Source§fn clone(&self) -> ApiKeySources
fn clone(&self) -> ApiKeySources
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ApiKeySources
impl Debug for ApiKeySources
Auto Trait Implementations§
impl Freeze for ApiKeySources
impl RefUnwindSafe for ApiKeySources
impl Send for ApiKeySources
impl Sync for ApiKeySources
impl Unpin for ApiKeySources
impl UnwindSafe for ApiKeySources
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more