pub struct IonFormula(/* private fields */);Expand description
An ion-facing chemical formula wrapper.
Implementations§
Source§impl IonFormula
impl IonFormula
Sourcepub const fn new(formula: ChemicalFormula) -> Self
pub const fn new(formula: ChemicalFormula) -> Self
Creates an ion formula wrapper.
Sourcepub const fn as_formula(&self) -> &ChemicalFormula
pub const fn as_formula(&self) -> &ChemicalFormula
Returns the wrapped formula.
Sourcepub fn into_formula(self) -> ChemicalFormula
pub fn into_formula(self) -> ChemicalFormula
Consumes the wrapper and returns the formula.
Trait Implementations§
Source§impl AsRef<ChemicalFormula> for IonFormula
impl AsRef<ChemicalFormula> for IonFormula
Source§fn as_ref(&self) -> &ChemicalFormula
fn as_ref(&self) -> &ChemicalFormula
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for IonFormula
impl Clone for IonFormula
Source§fn clone(&self) -> IonFormula
fn clone(&self) -> IonFormula
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 IonFormula
impl Debug for IonFormula
Source§impl Display for IonFormula
impl Display for IonFormula
Source§impl From<ChemicalFormula> for IonFormula
impl From<ChemicalFormula> for IonFormula
Source§fn from(value: ChemicalFormula) -> Self
fn from(value: ChemicalFormula) -> Self
Converts to this type from the input type.
Source§impl PartialEq for IonFormula
impl PartialEq for IonFormula
Source§fn eq(&self, other: &IonFormula) -> bool
fn eq(&self, other: &IonFormula) -> bool
Tests for
self and other values to be equal, and is used by ==.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