Struct mzdata::spectrum::SpectrumGroup
source · pub struct SpectrumGroup<C = CentroidPeak, D = DeconvolutedPeak, S = MultiLayerSpectrum<C, D>>{
pub precursor: Option<S>,
pub products: Vec<S>,
/* private fields */
}Expand description
A pairing of an optional MS1 spectrum with all its associated MSn spectra.
Fields§
§precursor: Option<S>The MS1 spectrum of a group. This may be absent when the source does not contain any MS1 spectra
products: Vec<S>The collection of related MSn spectra. If MSn for n > 2 is used, all levels are present in this collection, though there is no ordering guarantee.
Implementations§
source§impl<'a, C, D, S> SpectrumGroup<C, D, S>
impl<'a, C, D, S> SpectrumGroup<C, D, S>
pub fn iter(&'a self) -> SpectrumGroupIter<'a, C, D, S> ⓘ
Trait Implementations§
source§impl<C, D, S> Clone for SpectrumGroup<C, D, S>where
C: CentroidLike + Default + Clone,
D: DeconvolutedCentroidLike + Default + Clone,
S: SpectrumLike<C, D> + Clone,
impl<C, D, S> Clone for SpectrumGroup<C, D, S>where
C: CentroidLike + Default + Clone,
D: DeconvolutedCentroidLike + Default + Clone,
S: SpectrumLike<C, D> + Clone,
source§fn clone(&self) -> SpectrumGroup<C, D, S>
fn clone(&self) -> SpectrumGroup<C, D, S>
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<C, D, S> Debug for SpectrumGroup<C, D, S>where
C: CentroidLike + Default + Debug,
D: DeconvolutedCentroidLike + Default + Debug,
S: SpectrumLike<C, D> + Debug,
impl<C, D, S> Debug for SpectrumGroup<C, D, S>where
C: CentroidLike + Default + Debug,
D: DeconvolutedCentroidLike + Default + Debug,
S: SpectrumLike<C, D> + Debug,
source§impl<C: CentroidLike + Default, D: DeconvolutedCentroidLike + Default, S: SpectrumLike<C, D>> Default for SpectrumGroup<C, D, S>
impl<C: CentroidLike + Default, D: DeconvolutedCentroidLike + Default, S: SpectrumLike<C, D>> Default for SpectrumGroup<C, D, S>
source§impl<C, D, S> IntoIterator for SpectrumGroup<C, D, S>where
C: CentroidLike + Default,
D: DeconvolutedCentroidLike + Default,
S: SpectrumLike<C, D> + Default,
impl<C, D, S> IntoIterator for SpectrumGroup<C, D, S>where
C: CentroidLike + Default,
D: DeconvolutedCentroidLike + Default,
S: SpectrumLike<C, D> + Default,
source§impl<C, D, S> SpectrumGrouping<C, D, S> for SpectrumGroup<C, D, S>
impl<C, D, S> SpectrumGrouping<C, D, S> for SpectrumGroup<C, D, S>
source§fn precursor_mut(&mut self) -> Option<&mut S>
fn precursor_mut(&mut self) -> Option<&mut S>
Get a mutable reference to the precursor spectrum, which may be absent
source§fn set_precursor(&mut self, prec: S)
fn set_precursor(&mut self, prec: S)
Explicitly set the precursor spectrum directly.
source§fn products_mut(&mut self) -> &mut Vec<S>
fn products_mut(&mut self) -> &mut Vec<S>
Get a mutable reference to the collection of product spectra
source§fn into_parts(self) -> (Option<S>, Vec<S>)
fn into_parts(self) -> (Option<S>, Vec<S>)
Decompose the group into its components, discarding any additional metrics
source§fn total_spectra(&self) -> usize
fn total_spectra(&self) -> usize
The total number of spectra in the group
source§fn earliest_spectrum(&self) -> Option<&S>
fn earliest_spectrum(&self) -> Option<&S>
The spectrum that occurred first chronologically
source§fn latest_spectrum(&self) -> Option<&S>
fn latest_spectrum(&self) -> Option<&S>
The spectrum that occurred last chronologically
source§fn lowest_ms_level(&self) -> Option<u8>
fn lowest_ms_level(&self) -> Option<u8>
The lowest MS level in the group
source§fn highest_ms_level(&self) -> Option<u8>
fn highest_ms_level(&self) -> Option<u8>
The highest MS level in the group
Auto Trait Implementations§
impl<C, D, S> Freeze for SpectrumGroup<C, D, S>where
S: Freeze,
impl<C, D, S> RefUnwindSafe for SpectrumGroup<C, D, S>
impl<C, D, S> Send for SpectrumGroup<C, D, S>
impl<C, D, S> Sync for SpectrumGroup<C, D, S>
impl<C, D, S> Unpin for SpectrumGroup<C, D, S>
impl<C, D, S> UnwindSafe for SpectrumGroup<C, D, S>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§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 moresource§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).source§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.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.