pub struct ElectricCurrent { /* private fields */ }Expand description
Electric current (base UnitDefinition ampere, A).
Scalar storage of a quantity (f64 and ElectricCurrentUnit).
Implementations§
Source§impl ElectricCurrent
impl ElectricCurrent
Sourcepub fn new(value: f64, unit: ElectricCurrentUnit) -> Self
pub fn new(value: f64, unit: ElectricCurrentUnit) -> Self
Create a new ElectricCurrentUnit.
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 value(&self) -> f64
pub fn value(&self) -> f64
Retrieve the value associated with this ElectricCurrent.
Sourcepub fn value_mut(&mut self) -> &mut f64
pub fn value_mut(&mut self) -> &mut f64
Retrieve the mutable value associated with this ElectricCurrent.
Sourcepub fn definition(&self) -> UnitDefinition
pub fn definition(&self) -> UnitDefinition
Retrieve the UnitDefinition associated with this ElectricCurrent.
Sourcepub fn to_yottaampere(&self) -> Self
pub fn to_yottaampere(&self) -> Self
Convert to ElectricCurrentUnit::yottaampere.
Sourcepub fn to_zettaampere(&self) -> Self
pub fn to_zettaampere(&self) -> Self
Convert to ElectricCurrentUnit::zettaampere.
Sourcepub fn to_exaampere(&self) -> Self
pub fn to_exaampere(&self) -> Self
Convert to ElectricCurrentUnit::exaampere.
Sourcepub fn to_petaampere(&self) -> Self
pub fn to_petaampere(&self) -> Self
Convert to ElectricCurrentUnit::petaampere.
Sourcepub fn to_teraampere(&self) -> Self
pub fn to_teraampere(&self) -> Self
Convert to ElectricCurrentUnit::teraampere.
Sourcepub fn to_gigaampere(&self) -> Self
pub fn to_gigaampere(&self) -> Self
Convert to ElectricCurrentUnit::gigaampere.
Sourcepub fn to_megaampere(&self) -> Self
pub fn to_megaampere(&self) -> Self
Convert to ElectricCurrentUnit::megaampere.
Sourcepub fn to_kiloampere(&self) -> Self
pub fn to_kiloampere(&self) -> Self
Convert to ElectricCurrentUnit::kiloampere.
Sourcepub fn to_hectoampere(&self) -> Self
pub fn to_hectoampere(&self) -> Self
Convert to ElectricCurrentUnit::hectoampere.
Sourcepub fn to_decaampere(&self) -> Self
pub fn to_decaampere(&self) -> Self
Convert to ElectricCurrentUnit::decaampere.
Sourcepub fn to_ampere(&self) -> Self
pub fn to_ampere(&self) -> Self
Convert to ElectricCurrentUnit::ampere.
Sourcepub fn to_deciampere(&self) -> Self
pub fn to_deciampere(&self) -> Self
Convert to ElectricCurrentUnit::deciampere.
Sourcepub fn to_centiampere(&self) -> Self
pub fn to_centiampere(&self) -> Self
Convert to ElectricCurrentUnit::centiampere.
Sourcepub fn to_milliampere(&self) -> Self
pub fn to_milliampere(&self) -> Self
Convert to ElectricCurrentUnit::milliampere.
Sourcepub fn to_microampere(&self) -> Self
pub fn to_microampere(&self) -> Self
Convert to ElectricCurrentUnit::microampere.
Sourcepub fn to_nanoampere(&self) -> Self
pub fn to_nanoampere(&self) -> Self
Convert to ElectricCurrentUnit::nanoampere.
Sourcepub fn to_picoampere(&self) -> Self
pub fn to_picoampere(&self) -> Self
Convert to ElectricCurrentUnit::picoampere.
Sourcepub fn to_femtoampere(&self) -> Self
pub fn to_femtoampere(&self) -> Self
Convert to ElectricCurrentUnit::femtoampere.
Sourcepub fn to_attoampere(&self) -> Self
pub fn to_attoampere(&self) -> Self
Convert to ElectricCurrentUnit::attoampere.
Sourcepub fn to_zeptoampere(&self) -> Self
pub fn to_zeptoampere(&self) -> Self
Convert to ElectricCurrentUnit::zeptoampere.
Sourcepub fn to_yoctoampere(&self) -> Self
pub fn to_yoctoampere(&self) -> Self
Convert to ElectricCurrentUnit::yoctoampere.
Sourcepub fn to_elementary_charge_per_second(&self) -> Self
pub fn to_elementary_charge_per_second(&self) -> Self
Sourcepub fn to_atomic_unit_of_charge_per_second(&self) -> Self
pub fn to_atomic_unit_of_charge_per_second(&self) -> Self
Sourcepub fn to_abampere(&self) -> Self
pub fn to_abampere(&self) -> Self
Convert to ElectricCurrentUnit::abampere.
Sourcepub fn to_gilbert(&self) -> Self
pub fn to_gilbert(&self) -> Self
Convert to ElectricCurrentUnit::gilbert.
Sourcepub fn to_statampere(&self) -> Self
pub fn to_statampere(&self) -> Self
Convert to ElectricCurrentUnit::statampere.
Trait Implementations§
Source§impl Add<Quantity> for ElectricCurrent
impl Add<Quantity> for ElectricCurrent
Source§impl Add for ElectricCurrent
impl Add for ElectricCurrent
Source§type Output = ElectricCurrent
type Output = ElectricCurrent
+ operator.Source§fn add(self, rhs: ElectricCurrent) -> Self
fn add(self, rhs: ElectricCurrent) -> Self
+ operation. Read moreSource§impl AddAssign<Quantity> for ElectricCurrent
impl AddAssign<Quantity> for ElectricCurrent
Source§fn add_assign(&mut self, rhs: Quantity)
fn add_assign(&mut self, rhs: Quantity)
+= operation. Read moreSource§impl AddAssign for ElectricCurrent
impl AddAssign for ElectricCurrent
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
+= operation. Read moreSource§impl Clone for ElectricCurrent
impl Clone for ElectricCurrent
Source§fn clone(&self) -> ElectricCurrent
fn clone(&self) -> ElectricCurrent
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ElectricCurrent
impl Debug for ElectricCurrent
Source§impl Default for ElectricCurrent
impl Default for ElectricCurrent
Source§fn default() -> ElectricCurrent
fn default() -> ElectricCurrent
Source§impl<T: IsScalarQuantity> Div<T> for ElectricCurrent
impl<T: IsScalarQuantity> Div<T> for ElectricCurrent
Source§impl Div<f64> for ElectricCurrent
impl Div<f64> for ElectricCurrent
Source§impl DivAssign<f64> for ElectricCurrent
impl DivAssign<f64> for ElectricCurrent
Source§fn div_assign(&mut self, rhs: f64)
fn div_assign(&mut self, rhs: f64)
/= operation. Read moreSource§impl FixedQuantity<ElectricCurrentUnit> for ElectricCurrent
impl FixedQuantity<ElectricCurrentUnit> for ElectricCurrent
Source§fn unit(&self) -> ElectricCurrentUnit
fn unit(&self) -> ElectricCurrentUnit
Source§fn convert(&self, unit: ElectricCurrentUnit) -> Self
fn convert(&self, unit: ElectricCurrentUnit) -> Self
Source§fn convert_mut(&mut self, unit: ElectricCurrentUnit)
fn convert_mut(&mut self, unit: ElectricCurrentUnit)
Source§fn unit_mut(&mut self) -> &mut ElectricCurrentUnit
fn unit_mut(&mut self) -> &mut ElectricCurrentUnit
Source§fn try_convert(&self, unit: Units) -> Result<Self, RuntimeUnitError>where
Self: Sized,
fn try_convert(&self, unit: Units) -> Result<Self, RuntimeUnitError>where
Self: Sized,
Source§impl From<&ElectricCurrent> for Units
impl From<&ElectricCurrent> for Units
Source§fn from(value: &ElectricCurrent) -> Self
fn from(value: &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 From<ElectricCurrent> for UnitDefinition
impl From<ElectricCurrent> for UnitDefinition
Source§fn from(value: ElectricCurrent) -> Self
fn from(value: ElectricCurrent) -> Self
Source§impl From<ElectricCurrent> for Units
impl From<ElectricCurrent> for Units
Source§fn from(value: ElectricCurrent) -> Self
fn from(value: ElectricCurrent) -> Self
Source§impl From<Quantity> for ElectricCurrent
impl From<Quantity> for ElectricCurrent
Source§fn from(quantity: Quantity) -> ElectricCurrent
fn from(quantity: Quantity) -> ElectricCurrent
Source§impl<T: IsScalarQuantity> Mul<T> for ElectricCurrent
impl<T: IsScalarQuantity> Mul<T> for ElectricCurrent
Source§impl Mul<f64> for ElectricCurrent
impl Mul<f64> for ElectricCurrent
Source§impl MulAssign<f64> for ElectricCurrent
impl MulAssign<f64> for ElectricCurrent
Source§fn mul_assign(&mut self, rhs: f64)
fn mul_assign(&mut self, rhs: f64)
*= operation. Read moreSource§impl PartialEq<ElectricCurrent> for Quantity
impl PartialEq<ElectricCurrent> for Quantity
Source§impl PartialEq<Quantity> for ElectricCurrent
impl PartialEq<Quantity> for ElectricCurrent
Source§impl PartialEq for ElectricCurrent
impl PartialEq for ElectricCurrent
Source§impl PartialOrd for ElectricCurrent
impl PartialOrd for ElectricCurrent
Source§impl Sub<Quantity> for ElectricCurrent
impl Sub<Quantity> for ElectricCurrent
Source§impl Sub for ElectricCurrent
impl Sub for ElectricCurrent
Source§type Output = ElectricCurrent
type Output = ElectricCurrent
- operator.Source§fn sub(self, rhs: ElectricCurrent) -> Self
fn sub(self, rhs: ElectricCurrent) -> Self
- operation. Read moreSource§impl SubAssign<Quantity> for ElectricCurrent
impl SubAssign<Quantity> for ElectricCurrent
Source§fn sub_assign(&mut self, rhs: Quantity)
fn sub_assign(&mut self, rhs: Quantity)
-= operation. Read moreSource§impl SubAssign for ElectricCurrent
impl SubAssign for ElectricCurrent
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
-= operation. Read more