[−][src]Struct libmedium::units::Voltage
Struct that represents an electrical voltage.
Implementations
impl Voltage
[src]
pub fn from_milli_volts(millis: i32) -> Voltage
[src]
Create a Voltage struct from a value measuring millivolts.
pub fn as_milli_volts(self) -> i32
[src]
Return this Voltage's value in millivolts.
pub fn from_volts(volts: impl Into<f64>) -> Voltage
[src]
Create a Voltage struct from a value measuring volts.
pub fn as_volts(self) -> f64
[src]
Return this Voltage's value in volts.
Trait Implementations
impl Add<Voltage> for Voltage
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, other: Self) -> Self
[src]
impl<S: VoltSensor> Average<Voltage> for S
[src]
fn read_average(&self) -> Result<P, Error>
[src]
impl Clone for Voltage
[src]
impl Copy for Voltage
[src]
impl<S: VoltSensor> Crit<Voltage> for S
[src]
fn read_crit(&self) -> Result<P, Error>
[src]
fn write_crit(&self, crit: P) -> Result<(), Error> where
Self: WritableSensorBase,
[src]
Self: WritableSensorBase,
impl Debug for Voltage
[src]
impl Display for Voltage
[src]
impl<T: Into<i32>> Div<T> for Voltage
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, other: T) -> Voltage
[src]
impl Eq for Voltage
[src]
impl Hash for Voltage
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<S: VoltSensor> Highest<Voltage> for S
[src]
fn read_highest(&self) -> Result<P, Error>
[src]
impl<S: VoltSensor> LowCrit<Voltage> for S
[src]
fn read_lcrit(&self) -> Result<P, Error>
[src]
fn write_lcrit(&self, lcrit: P) -> Result<(), Error> where
Self: WritableSensorBase,
[src]
Self: WritableSensorBase,
impl<S: VoltSensor> Lowest<Voltage> for S
[src]
fn read_lowest(&self) -> Result<P, Error>
[src]
impl<S: VoltSensor> Max<Voltage> for S
[src]
fn read_max(&self) -> Result<P, Error>
[src]
fn write_max(&self, max: P) -> Result<(), Error> where
Self: WritableSensorBase,
[src]
Self: WritableSensorBase,
impl<S: VoltSensor> Min<Voltage> for S
[src]
fn read_min(&self) -> Result<P, Error>
[src]
fn write_min(&self, min: P) -> Result<(), Error> where
Self: WritableSensorBase,
[src]
Self: WritableSensorBase,
impl<T: Into<i32>> Mul<T> for Voltage
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, other: T) -> Voltage
[src]
impl Ord for Voltage
[src]
fn cmp(&self, other: &Voltage) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Voltage> for Voltage
[src]
impl PartialOrd<Voltage> for Voltage
[src]
fn partial_cmp(&self, other: &Voltage) -> Option<Ordering>
[src]
fn lt(&self, other: &Voltage) -> bool
[src]
fn le(&self, other: &Voltage) -> bool
[src]
fn gt(&self, other: &Voltage) -> bool
[src]
fn ge(&self, other: &Voltage) -> bool
[src]
impl Raw for Voltage
[src]
impl<S: VoltSensor> Sensor<Voltage> for S
[src]
fn read_input(&self) -> Result<P, Error>
[src]
fn read_enable(&self) -> Result<bool, Error>
[src]
fn write_enable(&self, enable: bool) -> Result<(), Error> where
Self: WritableSensorBase,
[src]
Self: WritableSensorBase,
impl StructuralEq for Voltage
[src]
impl StructuralPartialEq for Voltage
[src]
Auto Trait Implementations
impl RefUnwindSafe for Voltage
impl Send for Voltage
impl Sync for Voltage
impl Unpin for Voltage
impl UnwindSafe for Voltage
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<S> Average<Voltage> for S where
S: VoltSensor,
[src]
S: VoltSensor,
fn read_average(&self) -> Result<P, Error>
[src]
impl<S> Average<Voltage> for S where
S: VoltSensor,
[src]
S: VoltSensor,
fn read_average(&self) -> Result<P, Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<S> Crit<Voltage> for S where
S: VoltSensor,
[src]
S: VoltSensor,
fn read_crit(&self) -> Result<P, Error>
[src]
fn write_crit(&self, crit: P) -> Result<(), Error> where
Self: WritableSensorBase,
[src]
Self: WritableSensorBase,
impl<S> Crit<Voltage> for S where
S: VoltSensor,
[src]
S: VoltSensor,
fn read_crit(&self) -> Result<P, Error>
[src]
fn write_crit(&self, crit: P) -> Result<(), Error> where
Self: WritableSensorBase,
[src]
Self: WritableSensorBase,
impl<T> From<T> for T
[src]
impl<S> Highest<Voltage> for S where
S: VoltSensor,
[src]
S: VoltSensor,
fn read_highest(&self) -> Result<P, Error>
[src]
impl<S> Highest<Voltage> for S where
S: VoltSensor,
[src]
S: VoltSensor,
fn read_highest(&self) -> Result<P, Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<S> LowCrit<Voltage> for S where
S: VoltSensor,
[src]
S: VoltSensor,
fn read_lcrit(&self) -> Result<P, Error>
[src]
fn write_lcrit(&self, lcrit: P) -> Result<(), Error> where
Self: WritableSensorBase,
[src]
Self: WritableSensorBase,
impl<S> LowCrit<Voltage> for S where
S: VoltSensor,
[src]
S: VoltSensor,
fn read_lcrit(&self) -> Result<P, Error>
[src]
fn write_lcrit(&self, lcrit: P) -> Result<(), Error> where
Self: WritableSensorBase,
[src]
Self: WritableSensorBase,
impl<S> Lowest<Voltage> for S where
S: VoltSensor,
[src]
S: VoltSensor,
fn read_lowest(&self) -> Result<P, Error>
[src]
impl<S> Lowest<Voltage> for S where
S: VoltSensor,
[src]
S: VoltSensor,
fn read_lowest(&self) -> Result<P, Error>
[src]
impl<S> Max<Voltage> for S where
S: VoltSensor,
[src]
S: VoltSensor,
fn read_max(&self) -> Result<P, Error>
[src]
fn write_max(&self, max: P) -> Result<(), Error> where
Self: WritableSensorBase,
[src]
Self: WritableSensorBase,
impl<S> Max<Voltage> for S where
S: VoltSensor,
[src]
S: VoltSensor,
fn read_max(&self) -> Result<P, Error>
[src]
fn write_max(&self, max: P) -> Result<(), Error> where
Self: WritableSensorBase,
[src]
Self: WritableSensorBase,
impl<S> Min<Voltage> for S where
S: VoltSensor,
[src]
S: VoltSensor,
fn read_min(&self) -> Result<P, Error>
[src]
fn write_min(&self, min: P) -> Result<(), Error> where
Self: WritableSensorBase,
[src]
Self: WritableSensorBase,
impl<S> Min<Voltage> for S where
S: VoltSensor,
[src]
S: VoltSensor,
fn read_min(&self) -> Result<P, Error>
[src]
fn write_min(&self, min: P) -> Result<(), Error> where
Self: WritableSensorBase,
[src]
Self: WritableSensorBase,
impl<S> Sensor<Voltage> for S where
S: VoltSensor,
[src]
S: VoltSensor,
fn read_input(&self) -> Result<P, Error>
[src]
fn read_enable(&self) -> Result<bool, Error>
[src]
fn write_enable(&self, enable: bool) -> Result<(), Error> where
Self: WritableSensorBase,
[src]
Self: WritableSensorBase,
impl<S> Sensor<Voltage> for S where
S: VoltSensor,
[src]
S: VoltSensor,
fn read_input(&self) -> Result<P, Error>
[src]
fn read_enable(&self) -> Result<bool, Error>
[src]
fn write_enable(&self, enable: bool) -> Result<(), Error> where
Self: WritableSensorBase,
[src]
Self: WritableSensorBase,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,