pub enum Reading<T> {
Fresh(T),
Stale(T),
Absent,
Malformed(String),
}Expand description
The outcome of a freshness-gated sidecar read.
Variants§
Fresh(T)
Parsed, and written within the sidecar’s freshness window.
Stale(T)
Parsed, but older than the window or carrying a future or unreadable mtime: the last thing a producer wrote, not a current measurement.
Absent
No file.
Malformed(String)
The file exists but could not be read or parsed as T.
Implementations§
Trait Implementations§
impl<T: PartialEq> StructuralPartialEq for Reading<T>
Auto Trait Implementations§
impl<T> Freeze for Reading<T>where
T: Freeze,
impl<T> RefUnwindSafe for Reading<T>where
T: RefUnwindSafe,
impl<T> Send for Reading<T>where
T: Send,
impl<T> Sync for Reading<T>where
T: Sync,
impl<T> Unpin for Reading<T>where
T: Unpin,
impl<T> UnsafeUnpin for Reading<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Reading<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