pub struct ReactantEntry(/* private fields */);Expand description
A reactant-side reaction entry.
Implementations§
Source§impl ReactantEntry
impl ReactantEntry
Sourcepub fn new(
coefficient: StoichiometricCoefficient,
formula: ChemicalFormula,
) -> Result<Self, StoichiometryValidationError>
pub fn new( coefficient: StoichiometricCoefficient, formula: ChemicalFormula, ) -> Result<Self, StoichiometryValidationError>
Creates a reactant entry.
§Errors
Returns StoichiometryValidationError::ZeroCoefficient if the coefficient is
structurally invalid.
Sourcepub fn from_entry(
entry: ReactionEntry,
) -> Result<Self, StoichiometryValidationError>
pub fn from_entry( entry: ReactionEntry, ) -> Result<Self, StoichiometryValidationError>
Creates a reactant wrapper from a reaction entry.
§Errors
Returns StoichiometryValidationError::ExpectedReactant when the entry is not a
reactant.
Sourcepub const fn as_entry(&self) -> &ReactionEntry
pub const fn as_entry(&self) -> &ReactionEntry
Returns the wrapped reaction entry.
Sourcepub fn into_entry(self) -> ReactionEntry
pub fn into_entry(self) -> ReactionEntry
Consumes the wrapper and returns the reaction entry.
Trait Implementations§
Source§impl Clone for ReactantEntry
impl Clone for ReactantEntry
Source§fn clone(&self) -> ReactantEntry
fn clone(&self) -> ReactantEntry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReactantEntry
impl Debug for ReactantEntry
Source§impl Display for ReactantEntry
impl Display for ReactantEntry
Source§impl PartialEq for ReactantEntry
impl PartialEq for ReactantEntry
impl Eq for ReactantEntry
impl StructuralPartialEq for ReactantEntry
Auto Trait Implementations§
impl Freeze for ReactantEntry
impl RefUnwindSafe for ReactantEntry
impl Send for ReactantEntry
impl Sync for ReactantEntry
impl Unpin for ReactantEntry
impl UnsafeUnpin for ReactantEntry
impl UnwindSafe for ReactantEntry
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