Struct CompoundFormula
pub struct CompoundFormula(/* private fields */);Expand description
A compound-facing chemical formula wrapper.
Implementations§
§impl CompoundFormula
impl CompoundFormula
pub const fn new(formula: ChemicalFormula) -> CompoundFormula
pub const fn new(formula: ChemicalFormula) -> CompoundFormula
Creates a compound formula wrapper.
pub const fn as_formula(&self) -> &ChemicalFormula
pub const fn as_formula(&self) -> &ChemicalFormula
Returns the wrapped formula.
pub fn into_formula(self) -> ChemicalFormula
pub fn into_formula(self) -> ChemicalFormula
Consumes the wrapper and returns the formula.
Trait Implementations§
§impl AsRef<ChemicalFormula> for CompoundFormula
impl AsRef<ChemicalFormula> for CompoundFormula
§fn as_ref(&self) -> &ChemicalFormula
fn as_ref(&self) -> &ChemicalFormula
Converts this type into a shared reference of the (usually inferred) input type.
§impl Clone for CompoundFormula
impl Clone for CompoundFormula
§fn clone(&self) -> CompoundFormula
fn clone(&self) -> CompoundFormula
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 more§impl Debug for CompoundFormula
impl Debug for CompoundFormula
§impl Display for CompoundFormula
impl Display for CompoundFormula
§impl From<ChemicalFormula> for CompoundFormula
impl From<ChemicalFormula> for CompoundFormula
§fn from(value: ChemicalFormula) -> CompoundFormula
fn from(value: ChemicalFormula) -> CompoundFormula
Converts to this type from the input type.
§impl PartialEq for CompoundFormula
impl PartialEq for CompoundFormula
impl Eq for CompoundFormula
impl StructuralPartialEq for CompoundFormula
Auto Trait Implementations§
impl Freeze for CompoundFormula
impl RefUnwindSafe for CompoundFormula
impl Send for CompoundFormula
impl Sync for CompoundFormula
impl Unpin for CompoundFormula
impl UnsafeUnpin for CompoundFormula
impl UnwindSafe for CompoundFormula
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