pub enum RevokeToken {
AccessToken(AccessToken),
RefreshToken(RefreshToken),
}Expand description
Represents a token that can be revoked, which can be either an access token or a refresh token.
Variants§
AccessToken(AccessToken)
RefreshToken(RefreshToken)
Implementations§
Source§impl RevokeToken
impl RevokeToken
Sourcepub fn new_access_token(token: &str) -> Self
pub fn new_access_token(token: &str) -> Self
Creates a RevokeToken instance for an access token.
Sourcepub fn new_refresh_token(token: &str) -> Self
pub fn new_refresh_token(token: &str) -> Self
Creates a RevokeToken instance for a refresh token.
pub fn access_token(&self) -> Option<&AccessToken>
pub fn refresh_token(&self) -> Option<&RefreshToken>
Trait Implementations§
Source§impl Clone for RevokeToken
impl Clone for RevokeToken
Source§fn clone(&self) -> RevokeToken
fn clone(&self) -> RevokeToken
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 RevokeToken
impl Debug for RevokeToken
Source§impl PartialEq for RevokeToken
impl PartialEq for RevokeToken
Source§fn eq(&self, other: &RevokeToken) -> bool
fn eq(&self, other: &RevokeToken) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RevokeToken
Auto Trait Implementations§
impl Freeze for RevokeToken
impl RefUnwindSafe for RevokeToken
impl Send for RevokeToken
impl Sync for RevokeToken
impl Unpin for RevokeToken
impl UnsafeUnpin for RevokeToken
impl UnwindSafe for RevokeToken
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