pub struct MohsHardness(/* private fields */);Implementations§
Source§impl MohsHardness
impl MohsHardness
Sourcepub fn new(value: f64) -> Result<Self, MohsHardnessError>
pub fn new(value: f64) -> Result<Self, MohsHardnessError>
Creates a Mohs hardness value in the inclusive range 1.0 through 10.0.
§Errors
Returns MohsHardnessError::NonFinite when the value is not finite.
Returns MohsHardnessError::OutOfRange when the value is outside 1.0..=10.0.
pub const fn value(self) -> f64
Trait Implementations§
Source§impl Clone for MohsHardness
impl Clone for MohsHardness
Source§fn clone(&self) -> MohsHardness
fn clone(&self) -> MohsHardness
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 MohsHardness
impl Debug for MohsHardness
Source§impl Display for MohsHardness
impl Display for MohsHardness
Source§impl FromStr for MohsHardness
impl FromStr for MohsHardness
Source§impl PartialEq for MohsHardness
impl PartialEq for MohsHardness
Source§impl PartialOrd for MohsHardness
impl PartialOrd for MohsHardness
impl Copy for MohsHardness
impl StructuralPartialEq for MohsHardness
Auto Trait Implementations§
impl Freeze for MohsHardness
impl RefUnwindSafe for MohsHardness
impl Send for MohsHardness
impl Sync for MohsHardness
impl Unpin for MohsHardness
impl UnsafeUnpin for MohsHardness
impl UnwindSafe for MohsHardness
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