[−][src]Struct libmedium::units::Current
Struct that represents an electrical current.
Implementations
impl Current
[src]
pub fn from_milli_amperes(millis: i32) -> Current
[src]
Create a Current struct from a value measuring milliamperes.
pub fn as_milli_amperes(self) -> i32
[src]
Return this Current's value in milliamperes.
pub fn from_amperes(joules: impl Into<f64>) -> Current
[src]
Create a Current struct from a value measuring amperes.
pub fn as_amperes(self) -> f64
[src]
Return this Current's value in amperes.
Trait Implementations
impl Add<Current> for Current
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, other: Self) -> Self
[src]
impl<S: CurrSensor> Average<Current> for S
[src]
fn read_average(&self) -> Result<P, Error>
[src]
impl Clone for Current
[src]
impl Copy for Current
[src]
impl<S: CurrSensor> Crit<Current> 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 Current
[src]
impl Display for Current
[src]
impl<T: Into<i32>> Div<T> for Current
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, other: T) -> Current
[src]
impl Eq for Current
[src]
impl Hash for Current
[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: CurrSensor> Highest<Current> for S
[src]
fn read_highest(&self) -> Result<P, Error>
[src]
impl<S: CurrSensor> LowCrit<Current> 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: CurrSensor> Lowest<Current> for S
[src]
fn read_lowest(&self) -> Result<P, Error>
[src]
impl<S: CurrSensor> Max<Current> 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: CurrSensor> Min<Current> 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 Current
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, other: T) -> Current
[src]
impl Ord for Current
[src]
fn cmp(&self, other: &Current) -> 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<Current> for Current
[src]
impl PartialOrd<Current> for Current
[src]
fn partial_cmp(&self, other: &Current) -> Option<Ordering>
[src]
fn lt(&self, other: &Current) -> bool
[src]
fn le(&self, other: &Current) -> bool
[src]
fn gt(&self, other: &Current) -> bool
[src]
fn ge(&self, other: &Current) -> bool
[src]
impl Raw for Current
[src]
impl<S: CurrSensor> Sensor<Current> 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 Current
[src]
impl StructuralPartialEq for Current
[src]
Auto Trait Implementations
impl RefUnwindSafe for Current
impl Send for Current
impl Sync for Current
impl Unpin for Current
impl UnwindSafe for Current
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<S> Average<Current> for S where
S: CurrSensor,
[src]
S: CurrSensor,
fn read_average(&self) -> Result<P, Error>
[src]
impl<S> Average<Current> for S where
S: CurrSensor,
[src]
S: CurrSensor,
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<Current> for S where
S: CurrSensor,
[src]
S: CurrSensor,
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<Current> for S where
S: CurrSensor,
[src]
S: CurrSensor,
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<Current> for S where
S: CurrSensor,
[src]
S: CurrSensor,
fn read_highest(&self) -> Result<P, Error>
[src]
impl<S> Highest<Current> for S where
S: CurrSensor,
[src]
S: CurrSensor,
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<Current> for S where
S: CurrSensor,
[src]
S: CurrSensor,
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<Current> for S where
S: CurrSensor,
[src]
S: CurrSensor,
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<Current> for S where
S: CurrSensor,
[src]
S: CurrSensor,
fn read_lowest(&self) -> Result<P, Error>
[src]
impl<S> Lowest<Current> for S where
S: CurrSensor,
[src]
S: CurrSensor,
fn read_lowest(&self) -> Result<P, Error>
[src]
impl<S> Max<Current> for S where
S: CurrSensor,
[src]
S: CurrSensor,
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<Current> for S where
S: CurrSensor,
[src]
S: CurrSensor,
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<Current> for S where
S: CurrSensor,
[src]
S: CurrSensor,
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<Current> for S where
S: CurrSensor,
[src]
S: CurrSensor,
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<Current> for S where
S: CurrSensor,
[src]
S: CurrSensor,
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<Current> for S where
S: CurrSensor,
[src]
S: CurrSensor,
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>,