pub struct Compound { /* private fields */ }Expand description
A compound parsed from formula
Contains info about composition and molar mass of compound, defined by formula
Implementations§
source§impl Compound
impl Compound
pub fn composition(&self) -> &Vec<Element>
sourcepub fn components(&self) -> &HashMap<&'static str, Component>
pub fn components(&self) -> &HashMap<&'static str, Component>
list components
sourcepub fn molar_mass(&self) -> f32
pub fn molar_mass(&self) -> f32
get molar mass of compound
Trait Implementations§
impl StructuralPartialEq for Compound
Auto Trait Implementations§
impl Freeze for Compound
impl RefUnwindSafe for Compound
impl Send for Compound
impl Sync for Compound
impl Unpin for Compound
impl UnwindSafe for Compound
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)