Struct feroxide::ElemReaction
[−]
[src]
pub struct ElemReaction<E: Element> { pub lhs: ReactionSide<E>, pub rhs: ReactionSide<E>, pub is_equilibrium: bool, }
An elementair reaction (not containing ions)
Fields
lhs: ReactionSide<E>
The left-hand-side
rhs: ReactionSide<E>
The right-hand-side
is_equilibrium: bool
Methods
impl<E: Element> ElemReaction<E>
[src]
fn ion_from_string(string: String) -> Option<ElemReaction<Ion>>
Convert a string representation of a reaction into one
fn molecule_from_string(string: String) -> Option<ElemReaction<Molecule>>
Convert a string representation of a reaction into one
fn reaction_sign(&self) -> &str
Get the sign of the equation ( → or ⇌ ), depending whether it is an equilibrium or not
fn swap(self) -> Self
Swap the equation
Trait Implementations
impl<E: Debug + Element> Debug for ElemReaction<E>
[src]
impl<E: Eq + Element> Eq for ElemReaction<E>
[src]
impl<E: PartialEq + Element> PartialEq for ElemReaction<E>
[src]
fn eq(&self, __arg_0: &ElemReaction<E>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ElemReaction<E>) -> bool
This method tests for !=
.
impl<E: Clone + Element> Clone for ElemReaction<E>
[src]
fn clone(&self) -> ElemReaction<E>
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<E: Hash + Element> Hash for ElemReaction<E>
[src]
fn hash<__HE: Hasher>(&self, __arg_0: &mut __HE)
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<E: Element> Reaction<E> for ElemReaction<E>
[src]
fn equalise(&self) -> bool
NOTE: This function is still a WIP!
fn is_valid(&self) -> bool
Check if the reaction is valid by comparing the amount of total atoms on both sides, and by checking if the total charge on both sides is equal Read more
fn energy_cost(&self) -> Energy
Calculate the cost of this reaction This can be negative in case of an exothermic reaction Read more
fn elem_reaction(&self) -> ElemReaction<E>
Get the ElemReaction version
impl<E: Element> Properties for ElemReaction<E>
[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())