pub struct AccessToken { /* private fields */ }Expand description
Secure access token with metadata
Implementations§
Source§impl AccessToken
impl AccessToken
Sourcepub fn new(
token: String,
expires_at: Option<SystemTime>,
scopes: Vec<String>,
metadata: HashMap<String, Value>,
) -> Self
pub fn new( token: String, expires_at: Option<SystemTime>, scopes: Vec<String>, metadata: HashMap<String, Value>, ) -> Self
Create a new access token
Sourcepub fn expires_at(&self) -> Option<SystemTime>
pub fn expires_at(&self) -> Option<SystemTime>
Get the token expiration time
Trait Implementations§
Source§impl Clone for AccessToken
impl Clone for AccessToken
Source§fn clone(&self) -> AccessToken
fn clone(&self) -> AccessToken
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 moreAuto Trait Implementations§
impl Freeze for AccessToken
impl RefUnwindSafe for AccessToken
impl Send for AccessToken
impl Sync for AccessToken
impl Unpin for AccessToken
impl UnwindSafe for AccessToken
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