Struct AuthCredential
pub struct AuthCredential {
pub credential_type: String,
pub token: Option<String>,
pub refresh_token: Option<String>,
pub expires_at: Option<u64>,
pub metadata: Value,
}Expand description
An authentication credential with optional token, refresh, and metadata.
Fields§
§credential_type: StringThe type of credential (e.g., “oauth2”, “api_key”, “service_account”).
token: Option<String>The primary token (access token, API key, etc.).
refresh_token: Option<String>Refresh token for obtaining new access tokens.
expires_at: Option<u64>Unix timestamp (seconds) when the credential expires.
metadata: ValueAdditional metadata (e.g., scopes, provider-specific fields).
Trait Implementations§
§impl Clone for AuthCredential
impl Clone for AuthCredential
§fn clone(&self) -> AuthCredential
fn clone(&self) -> AuthCredential
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 more§impl Debug for AuthCredential
impl Debug for AuthCredential
§impl<'de> Deserialize<'de> for AuthCredential
impl<'de> Deserialize<'de> for AuthCredential
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AuthCredential, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AuthCredential, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Serialize for AuthCredential
impl Serialize for AuthCredential
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for AuthCredential
impl RefUnwindSafe for AuthCredential
impl Send for AuthCredential
impl Sync for AuthCredential
impl Unpin for AuthCredential
impl UnwindSafe for AuthCredential
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