pub struct TrendMetric {
pub name: &'static str,
pub label: &'static str,
pub previous: f64,
pub current: f64,
pub delta: f64,
pub direction: TrendDirection,
pub unit: &'static str,
pub previous_count: Option<TrendCount>,
pub current_count: Option<TrendCount>,
}Expand description
A single metric’s trend between two snapshots.
Fields§
§name: &'static strMetric identifier, e.g. "score" or "dead_file_pct".
label: &'static strHuman-readable label, e.g. "Health Score" or "Dead Files".
previous: f64Previous value (from snapshot).
current: f64Current value (from this run).
delta: f64Absolute change (current - previous).
direction: TrendDirectionDirection of change.
unit: &'static strUnit for display, e.g. "%", "", or "pts".
previous_count: Option<TrendCount>Raw count from previous snapshot (for JSON consumers).
current_count: Option<TrendCount>Raw count from current run (for JSON consumers).
Trait Implementations§
Source§impl Clone for TrendMetric
impl Clone for TrendMetric
Source§impl Debug for TrendMetric
impl Debug for TrendMetric
Source§impl<'de> Deserialize<'de> for TrendMetric
impl<'de> Deserialize<'de> for TrendMetric
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 Freeze for TrendMetric
impl RefUnwindSafe for TrendMetric
impl Send for TrendMetric
impl Sync for TrendMetric
impl Unpin for TrendMetric
impl UnsafeUnpin for TrendMetric
impl UnwindSafe for TrendMetric
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