pub enum ProviderAuthStatus {
Configured {
format_valid: bool,
},
EnvVar {
var_name: String,
},
OAuth,
Missing,
}Expand description
The authentication status of a provider.
Variants§
Configured
API key is configured and has a recognized format.
EnvVar
Auth is configured via environment variable reference.
OAuth
OAuth token is configured.
Missing
No authentication is configured for this provider.
Implementations§
Source§impl ProviderAuthStatus
impl ProviderAuthStatus
Sourcepub fn from_provider(provider_id: &str, auth_entry: Option<&AuthEntry>) -> Self
pub fn from_provider(provider_id: &str, auth_entry: Option<&AuthEntry>) -> Self
Check the auth status for a given provider based on its auth entry and provider configuration.
Sourcepub fn from_env_var(provider_id: &str) -> Self
pub fn from_env_var(provider_id: &str) -> Self
Check auth status using env var fallback.
Trait Implementations§
Source§impl Clone for ProviderAuthStatus
impl Clone for ProviderAuthStatus
Source§fn clone(&self) -> ProviderAuthStatus
fn clone(&self) -> ProviderAuthStatus
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 ProviderAuthStatus
impl Debug for ProviderAuthStatus
Source§impl PartialEq for ProviderAuthStatus
impl PartialEq for ProviderAuthStatus
Source§fn eq(&self, other: &ProviderAuthStatus) -> bool
fn eq(&self, other: &ProviderAuthStatus) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ProviderAuthStatus
impl StructuralPartialEq for ProviderAuthStatus
Auto Trait Implementations§
impl Freeze for ProviderAuthStatus
impl RefUnwindSafe for ProviderAuthStatus
impl Send for ProviderAuthStatus
impl Sync for ProviderAuthStatus
impl Unpin for ProviderAuthStatus
impl UnsafeUnpin for ProviderAuthStatus
impl UnwindSafe for ProviderAuthStatus
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.