pub struct Timestamped<T> {
pub value: T,
pub timestamp: SystemTime,
}Expand description
A value with the time it was produced (Timestamped<T>).
Fields§
§value: TThe value (Value).
timestamp: SystemTimeThe time of the value (Timestamp).
Implementations§
Source§impl<T> Timestamped<T>
impl<T> Timestamped<T>
pub fn new(value: T, timestamp: SystemTime) -> Self
Trait Implementations§
Source§impl<T: Clone> Clone for Timestamped<T>
impl<T: Clone> Clone for Timestamped<T>
Source§impl<T: Debug> Debug for Timestamped<T>
impl<T: Debug> Debug for Timestamped<T>
Source§impl<T: Display> Display for Timestamped<T>
impl<T: Display> Display for Timestamped<T>
impl<T: Eq> Eq for Timestamped<T>
Source§impl<T: Hash> Hash for Timestamped<T>
impl<T: Hash> Hash for Timestamped<T>
Source§impl<T: PartialEq> PartialEq for Timestamped<T>
impl<T: PartialEq> PartialEq for Timestamped<T>
impl<T: PartialEq> StructuralPartialEq for Timestamped<T>
Auto Trait Implementations§
impl<T> Freeze for Timestamped<T>where
T: Freeze,
impl<T> RefUnwindSafe for Timestamped<T>where
T: RefUnwindSafe,
impl<T> Send for Timestamped<T>where
T: Send,
impl<T> Sync for Timestamped<T>where
T: Sync,
impl<T> Unpin for Timestamped<T>where
T: Unpin,
impl<T> UnsafeUnpin for Timestamped<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Timestamped<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