Skip to main content

SpectrumGroup

Struct 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>

Source

pub fn new(precursor: Option<S>, products: Vec<S>) -> Self

Source

pub fn iter(&'a self) -> SpectrumGroupIter<'a, C, D, S> ⓘ

Trait Implementations§

Source§

impl<C, D, S> Clone for SpectrumGroup<C, D, S>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<C, D, S> Debug for SpectrumGroup<C, D, S>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<C: CentroidLike, D: DeconvolutedCentroidLike, S: SpectrumLike<C, D>> Default for SpectrumGroup<C, D, S>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<C, D, S> IntoIterator for SpectrumGroup<C, D, S>

Source§

type Item = S

The type of the elements being iterated over.
Source§

type IntoIter = SpectrumGroupIntoIter<C, D, S>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<C, D, S> PartialEq for SpectrumGroup<C, D, S>

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<C, D, S> SpectrumGrouping<C, D, S> for SpectrumGroup<C, D, S>

Source§

fn precursor(&self) -> Option<&S>

Get the precursor spectrum, which may be absent
Source§

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)

Explicitly set the precursor spectrum directly.
Source§

fn products(&self) -> &[S]

Get a reference to the collection of product spectra
Source§

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>)

Decompose the group into its components, discarding any additional metrics
Source§

fn total_spectra(&self) -> usize

The total number of spectra in the group
Source§

fn earliest_spectrum(&self) -> Option<&S>

The spectrum that occurred first chronologically
Source§

fn latest_spectrum(&self) -> Option<&S>

The spectrum that occurred last chronologically
Source§

fn lowest_ms_level(&self) -> Option<u8>

The lowest MS level in the group. Returns None if the group is empty or the MS level is 0.
Source§

fn highest_ms_level(&self) -> Option<u8>

The highest MS level in the group. Returns None if the group is empty or the MS level is 0.
Source§

impl<C, D, S> StructuralPartialEq for SpectrumGroup<C, D, S>

Auto Trait Implementations§

§

impl<C, D, S> Freeze for SpectrumGroup<C, D, S>

§

impl<C, D, S> RefUnwindSafe for SpectrumGroup<C, D, S>

§

impl<C, D, S> Send for SpectrumGroup<C, D, S>
where Option<S>: Send, Vec<S>: Send, PhantomData<C>: Send, PhantomData<D>: Send,

§

impl<C, D, S> Sync for SpectrumGroup<C, D, S>
where Option<S>: Sync, Vec<S>: Sync, PhantomData<C>: Sync, PhantomData<D>: Sync,

§

impl<C, D, S> Unpin for SpectrumGroup<C, D, S>

§

impl<C, D, S> UnsafeUnpin for SpectrumGroup<C, D, S>

§

impl<C, D, S> UnwindSafe for SpectrumGroup<C, D, S>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.