pub enum AzureOpenAIAuth {
ApiKey(String),
Token(String),
}Expand description
The authentication type for Azure OpenAI. Can either be an API key or a token. String types will automatically be coerced to a bearer auth token by default.
Variants§
Trait Implementations§
Source§impl ApiKey for AzureOpenAIAuth
impl ApiKey for AzureOpenAIAuth
Source§fn into_header(self) -> Option<Result<(HeaderName, HeaderValue), Error>>
fn into_header(self) -> Option<Result<(HeaderName, HeaderValue), Error>>
Convert this key into a default request header, if the generic client
should own that authentication header.
Source§impl Clone for AzureOpenAIAuth
impl Clone for AzureOpenAIAuth
Source§fn clone(&self) -> AzureOpenAIAuth
fn clone(&self) -> AzureOpenAIAuth
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 moreSource§impl Debug for AzureOpenAIAuth
impl Debug for AzureOpenAIAuth
Source§impl<S> From<S> for AzureOpenAIAuth
impl<S> From<S> for AzureOpenAIAuth
Source§fn from(token: S) -> AzureOpenAIAuth
fn from(token: S) -> AzureOpenAIAuth
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AzureOpenAIAuth
impl RefUnwindSafe for AzureOpenAIAuth
impl Send for AzureOpenAIAuth
impl Sync for AzureOpenAIAuth
impl Unpin for AzureOpenAIAuth
impl UnsafeUnpin for AzureOpenAIAuth
impl UnwindSafe for AzureOpenAIAuth
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