Enum rustyms::MassTolerance
source · pub enum MassTolerance {
Ppm(f64),
Absolute(Mass),
}Expand description
A tolerance around a given mass for searching purposes
Variants§
Ppm(f64)
A relative search tolerance in parts per million
Absolute(Mass)
An absolute tolerance defined by a constant offset from the mass (bounds are mass - tolerance, mass + tolerance)
Implementations§
Trait Implementations§
source§impl Clone for MassTolerance
impl Clone for MassTolerance
source§fn clone(&self) -> MassTolerance
fn clone(&self) -> MassTolerance
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 MassTolerance
impl Debug for MassTolerance
source§impl Display for MassTolerance
impl Display for MassTolerance
source§impl FromStr for MassTolerance
impl FromStr for MassTolerance
source§impl PartialEq for MassTolerance
impl PartialEq for MassTolerance
source§fn eq(&self, other: &MassTolerance) -> bool
fn eq(&self, other: &MassTolerance) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl TryFrom<&str> for MassTolerance
impl TryFrom<&str> for MassTolerance
impl Copy for MassTolerance
impl StructuralPartialEq for MassTolerance
Auto Trait Implementations§
impl RefUnwindSafe for MassTolerance
impl Send for MassTolerance
impl Sync for MassTolerance
impl Unpin for MassTolerance
impl UnwindSafe for MassTolerance
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
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.