Struct feroxide::Atom
[−]
[src]
pub struct Atom { pub number: AtomNumber, pub group: AtomGroup, pub symbol: &'static str, pub name: &'static str, pub mass: AtomMass, pub diatomic: bool, }
An atom
Fields
number: AtomNumber
Atom Number (Hydrogen: 1)
group: AtomGroup
Atom Group (Hydrogen: 1)
symbol: &'static str
Atom symbol (Hydrogen: H)
name: &'static str
Atom name (Hydrogen: hydrogen)
mass: AtomMass
Atom mass (Hydrogen: 1.008)
diatomic: bool
Methods
impl Atom
[src]
fn from_string(symbol: String) -> Option<Atom>
Convert a string representation to an Atom
Trait Implementations
impl Debug for Atom
[src]
impl Clone for Atom
[src]
fn clone(&self) -> Atom
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Eq for Atom
[src]
impl PartialEq for Atom
[src]
fn eq(&self, rhs: &Atom) -> bool
Two atoms are equal when their atom numbers are equal
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl Hash for Atom
[src]
fn hash<H: Hasher>(&self, state: &mut H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Properties for Atom
[src]
fn symbol(&self) -> String
Get the symbol of the current item
fn name(&self) -> String
Get the name of the current item
fn mass(&self) -> AtomMass
Get the mass of the current item
fn stringify(&self) -> String
Stringify the current item (default: self.symbol())