Struct sensehat::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]

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

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

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

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

Create new Pressure from floating point value in psi

Create new Pressure from floating point value in Bar

Create new Pressure from floating point value in Atmospheres

Convert this Pressure into a floating point value in Pascals

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

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

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

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

Convert this Pressure into a floating point value in Bar

Convert this Pressure into a floating point value in Atmospheres

Trait Implementations

impl Add<Pressure> for Pressure
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl PartialOrd<Pressure> for Pressure
[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 Sub<Pressure> for Pressure
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl Display for Pressure
[src]

Formats the value using the given formatter. Read more

impl Clone for Pressure
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Pressure
[src]

Formats the value using the given formatter. Read more

impl Mul<Pressure> for Area
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Area> for Pressure
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Pressure> for f64
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<f64> for Pressure
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Copy for Pressure
[src]

impl Eq for Pressure
[src]

impl PartialEq<Pressure> for Pressure
[src]

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

This method tests for !=.

impl Measurement for Pressure
[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 Div<f64> for Pressure
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Pressure> for Force
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Pressure> for Pressure
[src]

The resulting type after applying the / operator.

Performs the / operation.

Auto Trait Implementations

impl Send for Pressure

impl Sync for Pressure