Struct IonFormula
pub struct IonFormula(/* private fields */);Expand description
An ion-facing chemical formula wrapper.
Implementations§
§impl IonFormula
impl IonFormula
pub const fn new(formula: ChemicalFormula) -> IonFormula
pub const fn new(formula: ChemicalFormula) -> IonFormula
Creates an ion 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 IonFormula
impl AsRef<ChemicalFormula> for IonFormula
§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 IonFormula
impl Clone for IonFormula
§fn clone(&self) -> IonFormula
fn clone(&self) -> IonFormula
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 IonFormula
impl Debug for IonFormula
§impl Display for IonFormula
impl Display for IonFormula
§impl From<ChemicalFormula> for IonFormula
impl From<ChemicalFormula> for IonFormula
§fn from(value: ChemicalFormula) -> IonFormula
fn from(value: ChemicalFormula) -> IonFormula
Converts to this type from the input type.
§impl PartialEq for IonFormula
impl PartialEq for IonFormula
impl Eq for IonFormula
impl StructuralPartialEq for IonFormula
Auto Trait Implementations§
impl Freeze for IonFormula
impl RefUnwindSafe for IonFormula
impl Send for IonFormula
impl Sync for IonFormula
impl Unpin for IonFormula
impl UnsafeUnpin for IonFormula
impl UnwindSafe for IonFormula
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