#[non_exhaustive]pub struct FetchAccessTokenResponse {
pub token: String,
pub expiration_time: Option<Timestamp>,
pub scopes: Vec<String>,
pub exchange_error: Option<ExchangeError>,
/* private fields */
}Expand description
Message for responding to getting an OAuth access token.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.token: StringThe token content.
expiration_time: Option<Timestamp>Expiration timestamp. Can be empty if unknown or non-expiring.
scopes: Vec<String>The scopes of the access token.
exchange_error: Option<ExchangeError>The error resulted from exchanging OAuth tokens from the service provider.
Implementations§
Source§impl FetchAccessTokenResponse
impl FetchAccessTokenResponse
pub fn new() -> Self
Sourcepub fn set_expiration_time<T>(self, v: T) -> Self
pub fn set_expiration_time<T>(self, v: T) -> Self
Sets the value of expiration_time.
Sourcepub fn set_or_clear_expiration_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_expiration_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of expiration_time.
Sourcepub fn set_scopes<T, V>(self, v: T) -> Self
pub fn set_scopes<T, V>(self, v: T) -> Self
Sets the value of scopes.
Sourcepub fn set_exchange_error<T>(self, v: T) -> Selfwhere
T: Into<ExchangeError>,
pub fn set_exchange_error<T>(self, v: T) -> Selfwhere
T: Into<ExchangeError>,
Sets the value of exchange_error.
Sourcepub fn set_or_clear_exchange_error<T>(self, v: Option<T>) -> Selfwhere
T: Into<ExchangeError>,
pub fn set_or_clear_exchange_error<T>(self, v: Option<T>) -> Selfwhere
T: Into<ExchangeError>,
Sets or clears the value of exchange_error.
Trait Implementations§
Source§impl Clone for FetchAccessTokenResponse
impl Clone for FetchAccessTokenResponse
Source§fn clone(&self) -> FetchAccessTokenResponse
fn clone(&self) -> FetchAccessTokenResponse
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 Debug for FetchAccessTokenResponse
impl Debug for FetchAccessTokenResponse
Source§impl Default for FetchAccessTokenResponse
impl Default for FetchAccessTokenResponse
Source§fn default() -> FetchAccessTokenResponse
fn default() -> FetchAccessTokenResponse
Returns the “default value” for a type. Read more
Source§impl Message for FetchAccessTokenResponse
impl Message for FetchAccessTokenResponse
Source§impl PartialEq for FetchAccessTokenResponse
impl PartialEq for FetchAccessTokenResponse
impl StructuralPartialEq for FetchAccessTokenResponse
Auto Trait Implementations§
impl Freeze for FetchAccessTokenResponse
impl RefUnwindSafe for FetchAccessTokenResponse
impl Send for FetchAccessTokenResponse
impl Sync for FetchAccessTokenResponse
impl Unpin for FetchAccessTokenResponse
impl UnwindSafe for FetchAccessTokenResponse
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