pub struct ProductEntry(/* private fields */);Expand description
A product-side reaction entry.
Implementations§
Source§impl ProductEntry
impl ProductEntry
Sourcepub fn new(
coefficient: StoichiometricCoefficient,
formula: ChemicalFormula,
) -> Result<Self, StoichiometryValidationError>
pub fn new( coefficient: StoichiometricCoefficient, formula: ChemicalFormula, ) -> Result<Self, StoichiometryValidationError>
Creates a product 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 product wrapper from a reaction entry.
§Errors
Returns StoichiometryValidationError::ExpectedProduct when the entry is not a
product.
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 ProductEntry
impl Clone for ProductEntry
Source§fn clone(&self) -> ProductEntry
fn clone(&self) -> ProductEntry
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 ProductEntry
impl Debug for ProductEntry
Source§impl Display for ProductEntry
impl Display for ProductEntry
Source§impl PartialEq for ProductEntry
impl PartialEq for ProductEntry
impl Eq for ProductEntry
impl StructuralPartialEq for ProductEntry
Auto Trait Implementations§
impl Freeze for ProductEntry
impl RefUnwindSafe for ProductEntry
impl Send for ProductEntry
impl Sync for ProductEntry
impl Unpin for ProductEntry
impl UnsafeUnpin for ProductEntry
impl UnwindSafe for ProductEntry
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