pub struct ExpiringValue<T> {
pub expires_at: u64,
pub data: T,
}
Fields§
§expires_at: u64
Seconds since the UNIX epoch
data: T
Implementations§
Source§impl<T> ExpiringValue<T>
impl<T> ExpiringValue<T>
Trait Implementations§
Source§impl<T: Clone> Clone for ExpiringValue<T>
impl<T: Clone> Clone for ExpiringValue<T>
Source§impl<T: Debug> Debug for ExpiringValue<T>
impl<T: Debug> Debug for ExpiringValue<T>
Source§impl<'de, T> Deserialize<'de> for ExpiringValue<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for ExpiringValue<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<T> Freeze for ExpiringValue<T>where
T: Freeze,
impl<T> RefUnwindSafe for ExpiringValue<T>where
T: RefUnwindSafe,
impl<T> Send for ExpiringValue<T>where
T: Send,
impl<T> Sync for ExpiringValue<T>where
T: Sync,
impl<T> Unpin for ExpiringValue<T>where
T: Unpin,
impl<T> UnwindSafe for ExpiringValue<T>where
T: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)