pub struct PollConfig {
pub pids: Vec<Pid>,
pub interval: Duration,
pub read_voltage: bool,
}Expand description
Configuration for a polling session.
Fields§
§pids: Vec<Pid>PIDs to poll each cycle.
interval: DurationInterval between poll cycles.
read_voltage: boolWhether to read battery voltage each cycle.
Implementations§
Source§impl PollConfig
impl PollConfig
Sourcepub fn with_interval(self, interval: Duration) -> Self
pub fn with_interval(self, interval: Duration) -> Self
Set the polling interval.
Sourcepub fn with_voltage(self, read_voltage: bool) -> Self
pub fn with_voltage(self, read_voltage: bool) -> Self
Set whether to read battery voltage.
Trait Implementations§
Source§impl Clone for PollConfig
impl Clone for PollConfig
Source§fn clone(&self) -> PollConfig
fn clone(&self) -> PollConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PollConfig
impl RefUnwindSafe for PollConfig
impl Send for PollConfig
impl Sync for PollConfig
impl Unpin for PollConfig
impl UnsafeUnpin for PollConfig
impl UnwindSafe for PollConfig
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