Struct measurements::pressure::Pressure [] [src]

pub struct Pressure { /* fields omitted */ }

The Pressure struct can be used to deal with presssures in a common way. Common metric and imperial units are supported.

Example

use measurements::Pressure;

let earth = Pressure::from_atmospheres(1.0);
let mbar = earth.as_millibars();
println!("Atmospheric pressure is {} mbar.", mbar);

Methods

impl Pressure
[src]

[src]

Create new Pressure from floating point value in Pascals (Pa)

[src]

Create new Pressure from floating point value in hectopascals (hPA)

[src]

Create new Pressure from floating point value in millibars (mBar)

[src]

Create new Pressure from floating point value in kilopascals (kPa)

[src]

Create new Pressure from floating point value in psi

[src]

Create new Pressure from floating point value in Bar

[src]

Create new Pressure from floating point value in Atmospheres

[src]

Convert this Pressure into a floating point value in Pascals

[src]

Convert this Pressure into a floating point value in hectopascals (hPA)

[src]

Convert this Pressure into a floating point value in millibars (mBar)

[src]

Convert this Pressure into a floating point value in kilopascals (kPA)

[src]

Convert this Pressure into a floating point value in pounds per square-inch (psi)

[src]

Convert this Pressure into a floating point value in Bar

[src]

Convert this Pressure into a floating point value in Atmospheres

Trait Implementations

impl Copy for Pressure
[src]

impl Clone for Pressure
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Pressure
[src]

[src]

Formats the value using the given formatter. Read more

impl Measurement for Pressure
[src]

[src]

Get this quantity in the base units

[src]

Create a new quantity from the base units

[src]

Return the base unit for this type, as a string. For example "kilograms" Read more

[src]

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

[src]

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

impl Display for Pressure
[src]

[src]

Formats the value using the given formatter. Read more

impl Add for Pressure
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Sub for Pressure
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl Div<Pressure> for Pressure
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl Div<f64> for Pressure
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl Mul<f64> for Pressure
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Mul<Pressure> for f64
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Eq for Pressure
[src]

impl PartialEq for Pressure
[src]

[src]

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

1.0.0
[src]

This method tests for !=.

impl PartialOrd for Pressure
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

1.0.0
[src]

This method tests less than (for self and other) and is used by the < operator. Read more

1.0.0
[src]

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

1.0.0
[src]

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

1.0.0
[src]

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

impl Mul<Pressure> for Area
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Mul<Area> for Pressure
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Div<Pressure> for Force
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

Auto Trait Implementations

impl Send for Pressure

impl Sync for Pressure