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>>
[src]
Convert a string representation of an elementary reaction into one
fn molecule_from_string(string: String) -> Option<ElemReaction<Molecule>>
[src]
Convert a string representation of a reaction into one
fn reaction_sign(&self) -> &str
[src]
Get the sign of the equation ( → or ⇌ ), depending whether it is an equilibrium or not
fn swap(self) -> Self
[src]
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
[src]
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
[src]
This method tests for !=
.
impl<E: Clone + Element> Clone for ElemReaction<E>
[src]
fn clone(&self) -> ElemReaction<E>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
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)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
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
[src]
NOTE: This function is still a WIP!
fn is_valid(&self) -> bool
[src]
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
[src]
Calculate the cost of this reaction This can be negative in case of an exothermic reaction Read more
fn elem_reaction(&self) -> ElemReaction<E>
[src]
Get the ElemReaction version
impl<E: Element> Properties for ElemReaction<E>
[src]
fn symbol(&self) -> String
[src]
Get the symbol of the current item
fn name(&self) -> String
[src]
Get the name of the current item
fn mass(&self) -> AtomMass
[src]
Get the mass of the current item
fn stringify(&self) -> String
[src]
Stringify the current item (default: self.symbol())