ElectricCurrentUnit

Enum ElectricCurrentUnit 

Source
pub enum ElectricCurrentUnit {
Show 26 variants yottaampere, zettaampere, exaampere, petaampere, teraampere, gigaampere, megaampere, kiloampere, hectoampere, decaampere, ampere, deciampere, centiampere, milliampere, microampere, nanoampere, picoampere, femtoampere, attoampere, zeptoampere, yoctoampere, elementary_charge_per_second, atomic_unit_of_charge_per_second, abampere, gilbert, statampere,
}
Expand description

Electric current (base UnitDefinition ampere, A).

Variants§

§

yottaampere

§

zettaampere

§

exaampere

§

petaampere

§

teraampere

§

gigaampere

§

megaampere

§

kiloampere

§

hectoampere

§

decaampere

§

ampere

§

deciampere

§

centiampere

§

milliampere

§

microampere

§

nanoampere

§

picoampere

§

femtoampere

§

attoampere

§

zeptoampere

§

yoctoampere

§

elementary_charge_per_second

§

atomic_unit_of_charge_per_second

§

abampere

§

gilbert

§

statampere

Implementations§

Source§

impl ElectricCurrentUnit

Source

pub fn get_yottaampere() -> UnitDefinition

Source

pub fn get_zettaampere() -> UnitDefinition

Source

pub fn get_exaampere() -> UnitDefinition

Source

pub fn get_petaampere() -> UnitDefinition

Source

pub fn get_teraampere() -> UnitDefinition

Source

pub fn get_gigaampere() -> UnitDefinition

Source

pub fn get_megaampere() -> UnitDefinition

Source

pub fn get_kiloampere() -> UnitDefinition

Source

pub fn get_hectoampere() -> UnitDefinition

Source

pub fn get_decaampere() -> UnitDefinition

Source

pub fn get_ampere() -> UnitDefinition

Source

pub fn get_deciampere() -> UnitDefinition

Source

pub fn get_centiampere() -> UnitDefinition

Source

pub fn get_milliampere() -> UnitDefinition

Source

pub fn get_microampere() -> UnitDefinition

Source

pub fn get_nanoampere() -> UnitDefinition

Source

pub fn get_picoampere() -> UnitDefinition

Source

pub fn get_femtoampere() -> UnitDefinition

Source

pub fn get_attoampere() -> UnitDefinition

Source

pub fn get_zeptoampere() -> UnitDefinition

Source

pub fn get_yoctoampere() -> UnitDefinition

Source

pub fn get_elementary_charge_per_second() -> UnitDefinition

Source

pub fn get_atomic_unit_of_charge_per_second() -> UnitDefinition

Source

pub fn get_abampere() -> UnitDefinition

Source

pub fn get_gilbert() -> UnitDefinition

Source

pub fn get_statampere() -> UnitDefinition

Source

pub const fn multiplier(&self) -> f64

Multiplier of unit to its base quantity.

Source

pub fn abbreviation(&self) -> &'static str

Abbreviation of unit.

Source

pub fn singular(&self) -> &'static str

Singular name of unit.

Source

pub fn plural(&self) -> &'static str

Plural name of unit.

Source

pub fn units() -> &'static [&'static str]

Available units for this [ElectricCurrentUnit].

Trait Implementations§

Source§

impl Clone for ElectricCurrentUnit

Source§

fn clone(&self) -> ElectricCurrentUnit

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ElectricCurrentUnit

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ElectricCurrentUnit

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Display for ElectricCurrentUnit

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FixedQuantity<ElectricCurrentUnit> for ElectricCurrent

Source§

fn unit(&self) -> ElectricCurrentUnit

Return unit associated with this quantity
Source§

fn convert(&self, unit: ElectricCurrentUnit) -> Self

Convert from this unit to another (creates a copy). No validation of base unit is made.
Source§

fn convert_mut(&mut self, unit: ElectricCurrentUnit)

Convert from this unit to another (modifies current quantity). No validation of base unit is made.
Source§

fn unit_mut(&mut self) -> &mut ElectricCurrentUnit

Return mutable unit associated with this quantity
Source§

fn try_convert(&self, unit: Units) -> Result<Self, RuntimeUnitError>
where Self: Sized,

Try to convert from this unit to another (creates a copy)
Source§

impl<const N: usize> FixedSliceQuantity<ElectricCurrentUnit, f64> for ElectricCurrentArray<N>

Source§

fn unit(&self) -> ElectricCurrentUnit

Return unit associated with this quantity
Source§

fn values(&self) -> &[f64]

Return values in quantity
Source§

fn values_mut(&mut self) -> &mut [f64]

Return mutable values in quantity
Source§

fn len(&self) -> usize

Return number of values in quantity
Source§

fn convert(&self, unit: ElectricCurrentUnit) -> Self

Convert a unit of one UnitType to another of the same type. No validation of base unit is made.
Source§

fn convert_mut(&mut self, unit: ElectricCurrentUnit)

Mutate current quantity, convering a unit of one UnitType to another of the same type. No validation of base unit is made.
Source§

fn try_convert(&self, unit: Units) -> Result<Self, RuntimeUnitError>
where Self: Sized,

Attempt to convert the unit given in unit to a UnitType. Base unit validation is made here.
Source§

impl FixedSliceQuantity<ElectricCurrentUnit, f64> for ElectricCurrentVec

Source§

fn unit(&self) -> ElectricCurrentUnit

Return unit associated with this quantity
Source§

fn values(&self) -> &[f64]

Return values in quantity
Source§

fn values_mut(&mut self) -> &mut [f64]

Return mutable values in quantity
Source§

fn len(&self) -> usize

Return number of values in quantity
Source§

fn convert(&self, unit: ElectricCurrentUnit) -> Self

Convert a unit of one UnitType to another of the same type. No validation of base unit is made.
Source§

fn convert_mut(&mut self, unit: ElectricCurrentUnit)

Mutate current quantity, convering a unit of one UnitType to another of the same type. No validation of base unit is made.
Source§

fn try_convert(&self, unit: Units) -> Result<Self, RuntimeUnitError>
where Self: Sized,

Attempt to convert the unit given in unit to a UnitType. Base unit validation is made here.
Source§

impl From<ElectricCurrentUnit> for UnitDefinition

Source§

fn from(value: ElectricCurrentUnit) -> Self

Converts to this type from the input type.
Source§

impl From<ElectricCurrentUnit> for Units

Source§

fn from(value: ElectricCurrentUnit) -> Self

Converts to this type from the input type.
Source§

impl Hash for ElectricCurrentUnit

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for ElectricCurrentUnit

Source§

fn eq(&self, other: &ElectricCurrentUnit) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TryFrom<&str> for ElectricCurrentUnit

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_from(value: &str) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<UnitDefinition> for ElectricCurrentUnit

Source§

type Error = RuntimeUnitError

The type returned in the event of a conversion error.
Source§

fn try_from(value: UnitDefinition) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Units> for ElectricCurrentUnit

Source§

type Error = RuntimeUnitError

The type returned in the event of a conversion error.
Source§

fn try_from(value: Units) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Unit for ElectricCurrentUnit

Source§

fn definition(&self) -> UnitDefinition

Return unit definition for this Unit Type

Source§

fn try_convert(&self, unit: UnitDefinition) -> Result<f64, RuntimeUnitError>

Try to compute conversion factor from this unit to another.
Source§

fn convert_unchecked(&self, unit: Self) -> f64

Compute conversion factor from this unit to another (no check of unit compatibility is made).
Source§

impl Copy for ElectricCurrentUnit

Source§

impl Eq for ElectricCurrentUnit

Source§

impl StructuralPartialEq for ElectricCurrentUnit

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.