[−][src]Struct capra_core::common::gas::Gas
A gas mix used in a dive.
Implementations
impl Gas
[src]
pub fn new(o2: usize, he: usize, n2: usize) -> Result<Self, GasError>
[src]
Returns a new Gas with the given parameters.
Arguments
o2
- Percentage fraction of oxygen in the mix.he
- Percentage fraction of helium in the mix.n2
- Percentage fraction of nitrogen in the mix.
Errors
This function will return a GasError
if the percentage fractions do not add up to 100.
pub fn fr_n2(&self) -> f64
[src]
Returns the fraction of nitrogen in the mix.
pub fn fr_o2(&self) -> f64
[src]
Returns the fraction of oxygen in the mix.
pub fn fr_he(&self) -> f64
[src]
Returns the fraction of helium in the mix.
pub fn o2(&self) -> usize
[src]
Returns the percentage fraction of oxygen in the mix.
pub fn he(&self) -> usize
[src]
Returns the percentage fraction of helium in the mix.
pub fn n2(&self) -> usize
[src]
Returns the percentage fraction of nitrogen in the mix.
pub fn equivalent_narcotic_depth(&self, depth: usize) -> usize
[src]
Returns the Equivalent Narcotic Depth (END) of the mix at a given depth.
Arguments
depth
- The depth the mix is being breathed at.
pub fn in_ppo2_range(&self, depth: usize, min: f64, max: f64) -> bool
[src]
Helper function to check whether the mix is in an acceptable ppO2 range at a given depth.
Arguments
depth
-Depth the mix is being breathed at.min
- Minimum tolerable ppO2.max
- Maximum tolerable ppO2.
pub fn pp_o2(&self, depth: usize, metres_per_bar: f64) -> f64
[src]
Returns the ppO2 of the mix at a given depth.
Arguments
depth
- Depth the mix is being breathed at.metres_per_bar
- Depth of water required to induce 1 bar of pressure.
pub fn pp_he(&self, depth: usize, metres_per_bar: f64) -> f64
[src]
Returns the ppHe of the mix at a given depth.
Arguments
depth
- Depth the mix is being breathed at.metres_per_bar
- Depth of water required to induce 1 bar of pressure.
pub fn pp_n2(&self, depth: usize, metre_per_bar: f64) -> f64
[src]
Returns the ppN2 of the mix at a given depth.
Arguments
depth
- Depth the mix is being breathed at.metres_per_bar
- Depth of water required to induce 1 bar of pressure.
Trait Implementations
impl Clone for Gas
[src]
impl Copy for Gas
[src]
impl Debug for Gas
[src]
impl Eq for Gas
[src]
impl Hash for Gas
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<Gas> for Gas
[src]
impl StructuralEq for Gas
[src]
impl StructuralPartialEq for Gas
[src]
Auto Trait Implementations
impl RefUnwindSafe for Gas
impl Send for Gas
impl Sync for Gas
impl Unpin for Gas
impl UnwindSafe for Gas
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,