Struct mcp3425::Voltage
[−]
[src]
pub struct Voltage { /* fields omitted */ }
A voltage measurement.
Methods
impl Voltage
[src]
pub fn from_millivolts(millivolts: i16) -> Self
[src]
Create a new Voltage
instance from a millivolt measurement.
pub fn as_millivolts(&self) -> i16
[src]
Return the voltage in millivolts.
pub fn as_volts(&self) -> f32
[src]
Return the voltage in volts.
Trait Implementations
impl Debug for Voltage
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Copy for Voltage
[src]
impl Clone for Voltage
[src]
fn clone(&self) -> Voltage
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for Voltage
[src]
fn eq(&self, __arg_0: &Voltage) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Voltage) -> bool
[src]
This method tests for !=
.