pub struct AtomicMassEntry { /* private fields */ }Expand description
A validated element symbol and atomic mass pair.
Implementations§
Source§impl AtomicMassEntry
impl AtomicMassEntry
Sourcepub fn new(
symbol: &str,
atomic_mass: f64,
) -> Result<AtomicMassEntry, MolarMassValidationError>
pub fn new( symbol: &str, atomic_mass: f64, ) -> Result<AtomicMassEntry, MolarMassValidationError>
Creates an atomic mass entry in grams per mole.
§Errors
Returns MolarMassValidationError::InvalidElementSymbol when symbol
does not match a chemical element symbol shape. Returns an atomic-mass
validation error when atomic_mass is not finite and positive.
Sourcepub const fn atomic_mass(&self) -> f64
pub const fn atomic_mass(&self) -> f64
Returns the atomic mass in grams per mole.
Trait Implementations§
Source§impl Clone for AtomicMassEntry
impl Clone for AtomicMassEntry
Source§fn clone(&self) -> AtomicMassEntry
fn clone(&self) -> AtomicMassEntry
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 AtomicMassEntry
impl Debug for AtomicMassEntry
Source§impl Display for AtomicMassEntry
impl Display for AtomicMassEntry
Source§impl PartialEq for AtomicMassEntry
impl PartialEq for AtomicMassEntry
impl StructuralPartialEq for AtomicMassEntry
Auto Trait Implementations§
impl Freeze for AtomicMassEntry
impl RefUnwindSafe for AtomicMassEntry
impl Send for AtomicMassEntry
impl Sync for AtomicMassEntry
impl Unpin for AtomicMassEntry
impl UnsafeUnpin for AtomicMassEntry
impl UnwindSafe for AtomicMassEntry
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