pub struct AuthClient { /* private fields */ }Implementations§
Source§impl AuthClient
impl AuthClient
pub fn new(config: SpapiConfig) -> Result<Self>
pub fn is_token_valid(&self) -> bool
pub async fn get_access_token(&mut self) -> Result<String>
pub async fn refresh_access_token(&mut self) -> Result<String>
Sourcepub fn get_token_remaining_time(&self) -> Option<u64>
pub fn get_token_remaining_time(&self) -> Option<u64>
Get the remaining time (in seconds) for the current cached token
Auto Trait Implementations§
impl Freeze for AuthClient
impl !RefUnwindSafe for AuthClient
impl Send for AuthClient
impl Sync for AuthClient
impl Unpin for AuthClient
impl !UnwindSafe for AuthClient
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