pub struct TokenEntry {
pub value: String,
pub expires_at: Option<i64>,
}Expand description
access token 缓存条目。
Fields§
§value: Stringtoken 值
expires_at: Option<i64>过期时刻(UNIX 秒);None 表示永不过期(未设置)
Implementations§
Source§impl TokenEntry
impl TokenEntry
Sourcepub fn is_expired(&self, now: i64) -> bool
pub fn is_expired(&self, now: i64) -> bool
Trait Implementations§
Source§impl Clone for TokenEntry
impl Clone for TokenEntry
Source§fn clone(&self) -> TokenEntry
fn clone(&self) -> TokenEntry
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 moreAuto Trait Implementations§
impl Freeze for TokenEntry
impl RefUnwindSafe for TokenEntry
impl Send for TokenEntry
impl Sync for TokenEntry
impl Unpin for TokenEntry
impl UnsafeUnpin for TokenEntry
impl UnwindSafe for TokenEntry
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