pub struct Provider {
pub id: String,
pub display_name: String,
pub methods: Vec<AuthMethod>,
pub note: Option<String>,
}Expand description
A single sign-in-able provider.
Fields§
§id: StringStable machine id (e.g. anthropic, openai, github-copilot).
display_name: StringHuman display name (e.g. Anthropic, OpenAI, GitHub Copilot).
methods: Vec<AuthMethod>The auth methods this provider offers, in the order to present them.
note: Option<String>A short catalog note (optional), e.g. plan or region.
Implementations§
Source§impl Provider
impl Provider
Sourcepub fn oauth(&self) -> Option<&OAuthConfig>
pub fn oauth(&self) -> Option<&OAuthConfig>
The first OAuth (authorization-code) method, if any.
Sourcepub fn device(&self) -> Option<&DeviceCodeConfig>
pub fn device(&self) -> Option<&DeviceCodeConfig>
The first device-code method, if any.
Sourcepub fn api_key(&self) -> Option<&ApiKeyConfig>
pub fn api_key(&self) -> Option<&ApiKeyConfig>
The first API-key method, if any.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Provider
impl<'de> Deserialize<'de> for Provider
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Provider
impl StructuralPartialEq for Provider
Auto Trait Implementations§
impl Freeze for Provider
impl RefUnwindSafe for Provider
impl Send for Provider
impl Sync for Provider
impl Unpin for Provider
impl UnsafeUnpin for Provider
impl UnwindSafe for Provider
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.