pub struct LocalValue<T> { /* private fields */ }Expand description
Wrapper around a value in memory, used for metrics. We need to use a mutex to keep track of when the value was last updated.
Implementations§
Source§impl<T: Clone + IntoVariant> LocalValue<T>
impl<T: Clone + IntoVariant> LocalValue<T>
Sourcepub fn get_with_time(&self) -> (T, DateTime)
pub fn get_with_time(&self) -> (T, DateTime)
Get the current value and timestamp.
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for LocalValue<T>
impl<T> !RefUnwindSafe for LocalValue<T>
impl<T> Send for LocalValue<T>
impl<T> Sync for LocalValue<T>
impl<T> Unpin for LocalValue<T>
impl<T> UnsafeUnpin for LocalValue<T>
impl<T> UnwindSafe for LocalValue<T>
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