Struct rustyms::MolecularCharge
source · pub struct MolecularCharge {
pub charge_carriers: Vec<(isize, MolecularFormula)>,
}
Expand description
A selection of ions that together define the charge of a peptide
Fields§
§charge_carriers: Vec<(isize, MolecularFormula)>
The ions that together define the charge of the peptide
Implementations§
source§impl MolecularCharge
impl MolecularCharge
sourcepub fn new(charge_carriers: &[(isize, MolecularFormula)]) -> Self
pub fn new(charge_carriers: &[(isize, MolecularFormula)]) -> Self
Create a charge state with the given ions
sourcepub fn all_charge_options(&self) -> Vec<Self>
pub fn all_charge_options(&self) -> Vec<Self>
Generate all possible charge carrier options from the selection of ions for use in fragment calculations
Trait Implementations§
source§impl Chemical for MolecularCharge
impl Chemical for MolecularCharge
source§fn formula(&self) -> MolecularFormula
fn formula(&self) -> MolecularFormula
Get the molecular formula
source§impl Clone for MolecularCharge
impl Clone for MolecularCharge
source§fn clone(&self) -> MolecularCharge
fn clone(&self) -> MolecularCharge
Returns a copy 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 MolecularCharge
impl Debug for MolecularCharge
source§impl<'de> Deserialize<'de> for MolecularCharge
impl<'de> Deserialize<'de> for MolecularCharge
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for MolecularCharge
impl Display for MolecularCharge
source§fn fmt(&self, f: &mut Formatter<'_>) -> Result
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Is not guaranteed to fully conform to the Pro Forma standard. Because the data structure accepts more than the standard. So adducts with other than +1/-1 charge states, or adducts with complex formula (not a single element) will not adhere to the standard.
source§impl Hash for MolecularCharge
impl Hash for MolecularCharge
source§impl Ord for MolecularCharge
impl Ord for MolecularCharge
source§fn cmp(&self, other: &MolecularCharge) -> Ordering
fn cmp(&self, other: &MolecularCharge) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for MolecularCharge
impl PartialEq for MolecularCharge
source§fn eq(&self, other: &MolecularCharge) -> bool
fn eq(&self, other: &MolecularCharge) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for MolecularCharge
impl PartialOrd for MolecularCharge
source§fn partial_cmp(&self, other: &MolecularCharge) -> Option<Ordering>
fn partial_cmp(&self, other: &MolecularCharge) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for MolecularCharge
impl Serialize for MolecularCharge
impl Eq for MolecularCharge
impl StructuralPartialEq for MolecularCharge
Auto Trait Implementations§
impl Freeze for MolecularCharge
impl RefUnwindSafe for MolecularCharge
impl Send for MolecularCharge
impl Sync for MolecularCharge
impl Unpin for MolecularCharge
impl UnwindSafe for MolecularCharge
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