#[non_exhaustive]pub enum PollEvent {
Reading {
pid: Pid,
reading: Reading,
},
EnhancedReading {
did: u16,
module: ModuleId,
reading: Reading,
},
Alert(ThresholdResult),
RuleFired {
rule_name: String,
description: String,
},
Error {
pid: Option<Pid>,
error: String,
},
Voltage(f64),
}Expand description
Events emitted by the polling loop.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Reading
A standard PID was read successfully.
EnhancedReading
An enhanced PID was read.
Alert(ThresholdResult)
A threshold was breached.
RuleFired
A diagnostic rule fired.
Error
Polling encountered a non-fatal error (polling continues).
Voltage(f64)
Battery voltage update.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PollEvent
impl RefUnwindSafe for PollEvent
impl Send for PollEvent
impl Sync for PollEvent
impl Unpin for PollEvent
impl UnsafeUnpin for PollEvent
impl UnwindSafe for PollEvent
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