pub struct DryDensity { /* private fields */ }Expand description
Dry Density calculation
§Example 1
An example using WetDensityChoice::Value() and MoistureContentChoice::Value(),
use billios::field_test::DryDensity;
use billios::field_test::types::{WetDensityChoice, MoistureContentChoice};
let dry_density = DryDensity::new(WetDensityChoice::Value(177.1429), MoistureContentChoice::Value(0.1428571));
assert_eq!(155., dry_density.calculate());Implementations§
Source§impl DryDensity
impl DryDensity
Sourcepub fn new(
wet_density: WetDensityChoice,
moisture_content: MoistureContentChoice,
) -> Self
pub fn new( wet_density: WetDensityChoice, moisture_content: MoistureContentChoice, ) -> Self
Create a new instance of DryDensity
§Arguments
-
wet_density- AWetDensityChoicefor the measurement: Wet Density. This offers the ability to use either a value (float), or pass an existingWetDensity::new()constructor. -
moisture_content- AMoistureContentChoicefor the measurement: Moisture Content. This offers the ability to use either a value (float), or pass an existingMoistureContent::new()constructor.
Sourcepub fn get_wet_density(&self) -> f64
pub fn get_wet_density(&self) -> f64
Getter for wet_density
Sourcepub fn get_moisture_content(&self) -> f64
pub fn get_moisture_content(&self) -> f64
Getter for wet_density
Trait Implementations§
Source§impl Clone for DryDensity
impl Clone for DryDensity
Source§fn clone(&self) -> DryDensity
fn clone(&self) -> DryDensity
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DryDensity
impl Debug for DryDensity
Source§impl Rounding for DryDensity
impl Rounding for DryDensity
impl Copy for DryDensity
Auto Trait Implementations§
impl Freeze for DryDensity
impl RefUnwindSafe for DryDensity
impl Send for DryDensity
impl Sync for DryDensity
impl Unpin for DryDensity
impl UnwindSafe for DryDensity
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more