Struct measurements::current::Current
source · [−]pub struct Current { /* private fields */ }
Expand description
The Current
struct can be used to deal with electric potential difference
in a common way.
Example
use measurements::Current;
let amperes = Current::from_milliamperes(35.0);
let a = amperes.as_amperes();
let u_a = amperes.as_microamperes();
println!("35 mA correspond to {} A or {} µA", a, u_a);
Implementations
Create a new Current from a floating point value in amperes
Create a new Current from a floating point value in milliamperes
Create a new Current from a floating point value in microamperes
Create a new Current from a floating point value in nanoamperes
Convert this Current into a floating point value in amperes
Convert this Current into a floating point value in milliamperes
Convert this Current into a floating point value in microamperes
Convert this Current into a floating point value in nanoamperes
Trait Implementations
Get this quantity in the base units
Create a new quantity from the base units
Return the base unit for this type, as a string. For example “kilograms” Read more
Returns a string containing the most appropriate units for this quantity, and a floating point value representing this quantity in those units. Useful when, for example, a length might be in millimeters if it is very small, or kilometers when it is very large. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Current
impl UnwindSafe for Current
Blanket Implementations
Mutably borrows from an owned value. Read more