pub fn cycle_read_iter_timeout<'a, U>(
    &'a mut self,
    metric: Metric<U>,
    cycle_period: CyclePeriod,
    timeout: Option<Duration>,
  ) -> CycleReadIterator<U>
  where
    U: MetrifulUnit
  {
    CycleReadIterator {
      device: self,
      first: true,
      error: false,
      metric,
      cycle_period,
      timeout,
    }
  }
/// Returns an iterator that reads the given metric repeatedly at the given
/// device-supported [`CyclePeriod`]. Note that the thread will block for
/// `interval` duration on each read. It reads indefinitely or until an error
/// occurs.
///
/// Only a single "metric" may be read per iteration, however various
/// combined pseudo-metrics can be be used to read more data, including
/// [`struct@METRIC_COMBINED_ALL`].
///
/// See the [`CycleReadIterator`] documentation for further information.
///
/// # Example
/// ```no_run
/// use std::time::Duration;
/// use metriful::{Metriful, CyclePeriod, metric::*};
///
/// # fn main() -> metriful::error::Result<()> {
/// let mut metriful = Metriful::try_new(17, "/dev/i2c-1", 0x71)?;
///
/// let iter = metriful.cycle_read_iter_timeout(
///   *METRIC_COMBINED_ALL,
///   CyclePeriod::Period0,
///   Some(Duration::from_secs(3)),
/// );
///
/// for metric in iter {
///   let metric = metric?;
///   println!("{}", metric);
/// }
/// # Ok(())
/// # }
/// ```
Returns an iterator that reads the given metric repeatedly at the given
device-supported [`CyclePeriod`]. Note that the thread will block for
`interval` duration on each read. It reads indefinitely or until an error
occurs.

Only a single "metric" may be read per iteration, however various
combined pseudo-metrics can be be used to read more data, including
[`struct@METRIC_COMBINED_ALL`].

See the [`CycleReadIterator`] documentation for further information.
Returns an iterator that reads the given metric repeatedly at the given device - supported [ ` CyclePeriod ` ] . Note that the thread will block for ` interval ` duration on each read . It reads indefinitely or until an error occurs . Only a single " metric " may be read per iteration however various combined pseudo - metrics can be be used to read more data including [ ` struct@METRIC_COMBINED_ALL ` ] . See the [ ` CycleReadIterator ` ] documentation for further information .
pub fn cycle_read_iter_timeout<'a, U>(
    &'a mut self,
    metric: Metric<U>,
    cycle_period: CyclePeriod,
    timeout: Option<Duration>,
  ) -> CycleReadIterator<U>
  where
    U: MetrifulUnit
  {
    CycleReadIterator {
      device: self,
      first: true,
      error: false,
      metric,
      cycle_period,
      timeout,
    }
  }
pub fn cycle_read_iter_timeout < ' a , U > ( & ' a mut self , metric : Metric < U > , cycle_period : CyclePeriod , timeout : Option < Duration > , ) -> CycleReadIterator < U > where U : MetrifulUnit { CycleReadIterator { device : self , first : true , error : false , metric , cycle_period , timeout , } }
Returns an iterator that reads the given metric repeatedly at the given
device-supported [`CyclePeriod`].
Returns an iterator that reads the given metric repeatedly at the given device - supported [ ` CyclePeriod ` ] .
&'a mut self
metric
Metric<U>
cycle_period
CyclePeriod
timeout
Option<Duration>
&'a mut self
metric
Metric<U>
cycle_period
CyclePeriod
timeout
Option<Duration>
example
```no_run
use std::time::Duration;
use metriful::{Metriful, CyclePeriod, metric::*}.
` ` ` no_run use std :: time :: Duration ; use metriful :: { Metriful CyclePeriod metric :: * } .
fn main() -> metriful::error::result<()> {


let iter = metriful.cycle_read_iter_timeout(
METRIC_COMBINED_ALL,
CyclePeriod::Period0,
Some(Duration::from_secs(3)),
).


let iter = metriful . cycle_read_iter_timeout ( METRIC_COMBINED_ALL CyclePeriod :: Period0 Some ( Duration :: from_secs ( 3 )) ) .
ok(())
None
}
None