pub struct OAuth2Response {
pub access_token: String,
pub expires_in: u64,
pub token_type: String,
pub scope: String,
pub expires_at: DateTime<Utc>,
}Fields§
§access_token: String§expires_in: u64§token_type: String§scope: String§expires_at: DateTime<Utc>Implementations§
Source§impl OAuth2Response
impl OAuth2Response
pub fn calculate_expiry(self) -> Self
pub fn is_expired(&self) -> bool
Trait Implementations§
Source§impl Clone for OAuth2Response
impl Clone for OAuth2Response
Source§fn clone(&self) -> OAuth2Response
fn clone(&self) -> OAuth2Response
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 moreSource§impl<'de> Deserialize<'de> for OAuth2Response
impl<'de> Deserialize<'de> for OAuth2Response
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
Auto Trait Implementations§
impl Freeze for OAuth2Response
impl RefUnwindSafe for OAuth2Response
impl Send for OAuth2Response
impl Sync for OAuth2Response
impl Unpin for OAuth2Response
impl UnwindSafe for OAuth2Response
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