pub struct Refreshed<T, E> { /* private fields */ }
Expand description
A value which will be refreshed asynchronously.
Implementations§
Source§impl<T, E> Refreshed<T, E>
impl<T, E> Refreshed<T, E>
Sourcepub fn get_updated(&self) -> Instant
pub fn get_updated(&self) -> Instant
Get the timestamp of the most recent successful update
Sourcepub fn get_last_error(&self) -> Option<Arc<E>>
pub fn get_last_error(&self) -> Option<Arc<E>>
The error message, if present, from the last attempted refresh.
Note that on each successful refresh, this is reset to None
.
Trait Implementations§
Auto Trait Implementations§
impl<T, E> Freeze for Refreshed<T, E>
impl<T, E> !RefUnwindSafe for Refreshed<T, E>
impl<T, E> Send for Refreshed<T, E>
impl<T, E> Sync for Refreshed<T, E>
impl<T, E> Unpin for Refreshed<T, E>
impl<T, E> !UnwindSafe for Refreshed<T, E>
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