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>

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) -> SpectrumGroup<C, D, S>

Returns a copy of the value. Read more
1.0.0 · 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 + Default, D: DeconvolutedCentroidLike + Default, 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>

§

type Item = S

The type of the elements being iterated over.
§

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> 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
source§

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>
where S: Send, C: Send, D: Send,

§

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

§

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

§

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

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§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
source§

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

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

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

§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.