/// Reads the given metric from the device. Note that the device must
/// currently be in a READY state or an error will be raised.
///
/// # Example
/// ```no_run
/// use metriful::{Metriful, metric::*};
///
/// # fn main() -> metriful::error::Result<()> {
/// let mut metriful = Metriful::try_new(17, "/dev/i2c-1", 0x71)?;
///
/// println!("{}", metriful.read(*METRIC_COMBINED_ALL)?);
/// # Ok(())
/// # }
/// ```
Reads the given metric from the device. Note that the device must
currently be in a READY state or an error will be raised.
Reads the given metric from the device . Note that the device must currently be in a READY state or an error will be raised .
pub fn read<U: MetrifulUnit>(&mut self, metric: Metric<U>) -> Result<UnitValue<U>> {
    self.ensure_ready()?;
    let ret = metric.read(&mut self.device);
    trace!("Metriful::read({:x?}) -> {:?}", metric, &ret);
    ret
  }
pub fn read < U : MetrifulUnit > ( & mut self , metric : Metric < U > ) -> Result < UnitValue < U > > { self . ensure_ready ( ) ? ; let ret = metric . read ( & mut self . device ) ; trace ! ( " " metric ret ) ; ret }
Reads the given metric from the device.
Reads the given metric from the device .
&mut self
metric
Metric<U>
example
```no_run
use metriful::{Metriful, metric::*}.
` ` ` no_run use metriful :: { Metriful metric :: * } .
fn main() -> metriful::error::result<()> {
None
ok(())
None
}
None