pub struct PressureSignal {
pub id: PressureId,
pub state: MetricState<PressureState>,
pub severity: MetricState<Percent>,
pub raw: Option<Measurement>,
pub rule: &'static str,
pub held_for: Option<Duration>,
}Expand description
One radar signal.
Fields§
§id: PressureIdWhich resource.
state: MetricState<PressureState>The derived state, or why it could not be derived.
severity: MetricState<Percent>Normalized 0..=100 severity, for sorting and bar length.
Separate from state because two signals can both be Watch while one
is far closer to critical.
raw: Option<Measurement>The raw metric the state was derived from (§2.3).
rule: &'static strHuman-readable statement of the rule that produced state (§2.3).
For example: "available < 15% of total for 10 of 15 samples".
held_for: Option<Duration>How long the signal has held its current state, for hysteresis display.
Implementations§
Source§impl PressureSignal
impl PressureSignal
Sourcepub const fn unsupported(id: PressureId, rule: &'static str) -> Self
pub const fn unsupported(id: PressureId, rule: &'static str) -> Self
A signal this platform cannot produce at all.
Sourcepub const fn warming_up(id: PressureId, rule: &'static str) -> Self
pub const fn warming_up(id: PressureId, rule: &'static str) -> Self
A signal awaiting the samples its rule requires.
Trait Implementations§
Source§impl Clone for PressureSignal
impl Clone for PressureSignal
Source§fn clone(&self) -> PressureSignal
fn clone(&self) -> PressureSignal
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PressureSignal
impl Debug for PressureSignal
Source§impl PartialEq for PressureSignal
impl PartialEq for PressureSignal
impl StructuralPartialEq for PressureSignal
Auto Trait Implementations§
impl Freeze for PressureSignal
impl RefUnwindSafe for PressureSignal
impl Send for PressureSignal
impl Sync for PressureSignal
impl Unpin for PressureSignal
impl UnsafeUnpin for PressureSignal
impl UnwindSafe for PressureSignal
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