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
No
Lr
Implementations§
Source§impl Element
impl Element
Sourcepub fn atomic_number(&self) -> u8
pub fn atomic_number(&self) -> u8
Returns the atomic number of the Element.
Sourcepub fn atomic_symbol(&self) -> String
pub fn atomic_symbol(&self) -> String
Returns the atomic symbol of the Element.
Sourcepub fn atomic_weight(&self, isotope: Option<u16>) -> Result<f64, Error>
pub fn atomic_weight(&self, isotope: Option<u16>) -> Result<f64, Error>
Returns the atomic weight of the Element. If isotope is None, the standard atomic weight is given.
Weights are sourced from NIST.
Trait Implementations§
impl Copy for Element
impl Eq for Element
impl StructuralPartialEq for Element
Auto Trait Implementations§
impl Freeze for Element
impl RefUnwindSafe for Element
impl Send for Element
impl Sync for Element
impl Unpin for Element
impl UnsafeUnpin 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