Struct runtime_units::ElectricCurrent
source · pub struct ElectricCurrent {
pub value: f64,
pub unit: ElectricCurrentUnit,
}Expand description
Electric current (base unit ampere, A).
Fields§
§value: f64§unit: ElectricCurrentUnitImplementations§
source§impl ElectricCurrent
impl ElectricCurrent
pub fn new(value: f64, unit: ElectricCurrentUnit) -> Self
sourcepub fn yottaampere(value: f64) -> Self
pub fn yottaampere(value: f64) -> Self
Create a new ElectricCurrent with units of ElectricCurrentUnit::yottaampere.
sourcepub fn zettaampere(value: f64) -> Self
pub fn zettaampere(value: f64) -> Self
Create a new ElectricCurrent with units of ElectricCurrentUnit::zettaampere.
sourcepub fn exaampere(value: f64) -> Self
pub fn exaampere(value: f64) -> Self
Create a new ElectricCurrent with units of ElectricCurrentUnit::exaampere.
sourcepub fn petaampere(value: f64) -> Self
pub fn petaampere(value: f64) -> Self
Create a new ElectricCurrent with units of ElectricCurrentUnit::petaampere.
sourcepub fn teraampere(value: f64) -> Self
pub fn teraampere(value: f64) -> Self
Create a new ElectricCurrent with units of ElectricCurrentUnit::teraampere.
sourcepub fn gigaampere(value: f64) -> Self
pub fn gigaampere(value: f64) -> Self
Create a new ElectricCurrent with units of ElectricCurrentUnit::gigaampere.
sourcepub fn megaampere(value: f64) -> Self
pub fn megaampere(value: f64) -> Self
Create a new ElectricCurrent with units of ElectricCurrentUnit::megaampere.
sourcepub fn kiloampere(value: f64) -> Self
pub fn kiloampere(value: f64) -> Self
Create a new ElectricCurrent with units of ElectricCurrentUnit::kiloampere.
sourcepub fn hectoampere(value: f64) -> Self
pub fn hectoampere(value: f64) -> Self
Create a new ElectricCurrent with units of ElectricCurrentUnit::hectoampere.
sourcepub fn decaampere(value: f64) -> Self
pub fn decaampere(value: f64) -> Self
Create a new ElectricCurrent with units of ElectricCurrentUnit::decaampere.
sourcepub fn ampere(value: f64) -> Self
pub fn ampere(value: f64) -> Self
Create a new ElectricCurrent with units of ElectricCurrentUnit::ampere.
sourcepub fn deciampere(value: f64) -> Self
pub fn deciampere(value: f64) -> Self
Create a new ElectricCurrent with units of ElectricCurrentUnit::deciampere.
sourcepub fn centiampere(value: f64) -> Self
pub fn centiampere(value: f64) -> Self
Create a new ElectricCurrent with units of ElectricCurrentUnit::centiampere.
sourcepub fn milliampere(value: f64) -> Self
pub fn milliampere(value: f64) -> Self
Create a new ElectricCurrent with units of ElectricCurrentUnit::milliampere.
sourcepub fn microampere(value: f64) -> Self
pub fn microampere(value: f64) -> Self
Create a new ElectricCurrent with units of ElectricCurrentUnit::microampere.
sourcepub fn nanoampere(value: f64) -> Self
pub fn nanoampere(value: f64) -> Self
Create a new ElectricCurrent with units of ElectricCurrentUnit::nanoampere.
sourcepub fn picoampere(value: f64) -> Self
pub fn picoampere(value: f64) -> Self
Create a new ElectricCurrent with units of ElectricCurrentUnit::picoampere.
sourcepub fn femtoampere(value: f64) -> Self
pub fn femtoampere(value: f64) -> Self
Create a new ElectricCurrent with units of ElectricCurrentUnit::femtoampere.
sourcepub fn attoampere(value: f64) -> Self
pub fn attoampere(value: f64) -> Self
Create a new ElectricCurrent with units of ElectricCurrentUnit::attoampere.
sourcepub fn zeptoampere(value: f64) -> Self
pub fn zeptoampere(value: f64) -> Self
Create a new ElectricCurrent with units of ElectricCurrentUnit::zeptoampere.
sourcepub fn yoctoampere(value: f64) -> Self
pub fn yoctoampere(value: f64) -> Self
Create a new ElectricCurrent with units of ElectricCurrentUnit::yoctoampere.
sourcepub fn elementary_charge_per_second(value: f64) -> Self
pub fn elementary_charge_per_second(value: f64) -> Self
Create a new ElectricCurrent with units of ElectricCurrentUnit::elementary_charge_per_second.
sourcepub fn atomic_unit_of_charge_per_second(value: f64) -> Self
pub fn atomic_unit_of_charge_per_second(value: f64) -> Self
Create a new ElectricCurrent with units of ElectricCurrentUnit::atomic_unit_of_charge_per_second.
sourcepub fn abampere(value: f64) -> Self
pub fn abampere(value: f64) -> Self
Create a new ElectricCurrent with units of ElectricCurrentUnit::abampere.
sourcepub fn gilbert(value: f64) -> Self
pub fn gilbert(value: f64) -> Self
Create a new ElectricCurrent with units of ElectricCurrentUnit::gilbert.
sourcepub fn statampere(value: f64) -> Self
pub fn statampere(value: f64) -> Self
Create a new ElectricCurrent with units of ElectricCurrentUnit::statampere.
sourcepub fn to_quantity(&self) -> Quantity
pub fn to_quantity(&self) -> Quantity
Create a Quantity from this ElectricCurrent.
Trait Implementations§
source§impl Clone for ElectricCurrent
impl Clone for ElectricCurrent
source§fn clone(&self) -> ElectricCurrent
fn clone(&self) -> ElectricCurrent
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ElectricCurrent
impl Debug for ElectricCurrent
source§impl From<ElectricCurrent> for ElectricCurrentQuantity
impl From<ElectricCurrent> for ElectricCurrentQuantity
source§fn from(quantity: ElectricCurrent) -> Self
fn from(quantity: ElectricCurrent) -> Self
source§impl From<ElectricCurrent> for Quantity
impl From<ElectricCurrent> for Quantity
source§fn from(quantity: ElectricCurrent) -> Self
fn from(quantity: ElectricCurrent) -> Self
source§impl PartialEq for ElectricCurrent
impl PartialEq for ElectricCurrent
source§fn eq(&self, other: &ElectricCurrent) -> bool
fn eq(&self, other: &ElectricCurrent) -> bool
self and other values to be equal, and is used
by ==.