pub struct OAuthToken {
pub access_token: String,
pub refresh_token: Option<String>,
pub expires_at: Option<DateTime<Utc>>,
pub token_type: Option<String>,
pub scope: Option<String>,
}Expand description
An OAuth token bundle (subset of oxicode_ai::oauth::TokenBundle).
Defined here as a separate minimal type so ports don’t need to depend
on oxicode-ai. Products that already use oxicode_ai::oauth::TokenBundle
can convert via From/Into.
Fields§
§access_token: StringBearer access token.
refresh_token: Option<String>Optional refresh token for renewal.
expires_at: Option<DateTime<Utc>>Expiration timestamp (UTC).
token_type: Option<String>Token type (typically "Bearer").
scope: Option<String>Granted scopes (provider-specific).
Implementations§
Trait Implementations§
Source§impl Clone for OAuthToken
impl Clone for OAuthToken
Source§fn clone(&self) -> OAuthToken
fn clone(&self) -> OAuthToken
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 OAuthToken
impl Debug for OAuthToken
Source§impl<'de> Deserialize<'de> for OAuthToken
impl<'de> Deserialize<'de> for OAuthToken
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 OAuthToken
Source§impl PartialEq for OAuthToken
impl PartialEq for OAuthToken
Source§impl Serialize for OAuthToken
impl Serialize for OAuthToken
impl StructuralPartialEq for OAuthToken
Auto Trait Implementations§
impl Freeze for OAuthToken
impl RefUnwindSafe for OAuthToken
impl Send for OAuthToken
impl Sync for OAuthToken
impl Unpin for OAuthToken
impl UnsafeUnpin for OAuthToken
impl UnwindSafe for OAuthToken
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.