Struct measurements::current::Current[][src]

pub struct Current { /* fields omitted */ }

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);

Methods

impl Current
[src]

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

impl Copy for Current
[src]

impl Clone for Current
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Current
[src]

Formats the value using the given formatter. Read more

impl Measurement for Current
[src]

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

Given a list of units and their scale relative to the base unit, select the most appropriate one. Read more

impl Display for Current
[src]

Formats the value using the given formatter. Read more

impl Add for Current
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl Sub for Current
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl Div<Current> for Current
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<f64> for Current
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Mul<f64> for Current
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Current> for f64
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Eq for Current
[src]

impl PartialEq for Current
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl PartialOrd for Current
[src]

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Mul<Voltage> for Current
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Current> for Voltage
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Div<Current> for Power
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Mul<Resistance> for Current
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Current> for Resistance
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Div<Current> for Voltage
[src]

The resulting type after applying the / operator.

Performs the / operation.

Auto Trait Implementations

impl Send for Current

impl Sync for Current