pub struct Element {
pub symbol: String,
pub isotopes: HashMap<u16, Isotope, FnvBuildHasher>,
pub most_abundant_isotope: u16,
pub most_abundant_mass: f64,
pub min_neutron_shift: i8,
pub max_neutron_shift: i8,
pub element_number: u8,
}Expand description
A chemical element with known masses and isotopic frequency.
This type forms the foundation of the library, and is usually
treated like a singleton in a PeriodicTable.
Fields§
§symbol: String§isotopes: HashMap<u16, Isotope, FnvBuildHasher>§most_abundant_isotope: u16§most_abundant_mass: f64§min_neutron_shift: i8§max_neutron_shift: i8§element_number: u8Implementations§
Source§impl Element
impl Element
pub fn mass(&self) -> f64
pub fn calc_min_neutron_shift(&self) -> i8
pub fn calc_max_neutron_shift(&self) -> i8
pub fn isotope_by_shift(&self, shift: i8) -> Option<&Isotope>
pub fn index_isotopes(&mut self)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Element
impl<'de> Deserialize<'de> for Element
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Element
impl RefUnwindSafe for Element
impl Send for Element
impl Sync for Element
impl Unpin for Element
impl UnwindSafe for Element
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