Struct SpectrumDescription

Source
pub struct SpectrumDescription {
    pub id: String,
    pub index: usize,
    pub ms_level: u8,
    pub polarity: ScanPolarity,
    pub signal_continuity: SignalContinuity,
    pub params: Vec<Param>,
    pub acquisition: Acquisition,
    pub precursor: Option<Precursor>,
}
Expand description

The set of descriptive metadata that give context for how a mass spectrum was acquired within a particular run. This forms the basis for a large portion of the SpectrumLike trait.

Fields§

§id: String

The spectrum’s native identifier

§index: usize

The ordinal sequence number for the spectrum

§ms_level: u8

The degree of exponentiation of the spectrum, e.g MS1, MS2, MS3, etc

§polarity: ScanPolarity

The spectrum is in positive or negative mode

§signal_continuity: SignalContinuity

The spectrum’s main representation is as a peak list or a continuous profile

§params: Vec<Param>

A set of controlled or uncontrolled descriptors of the spectrum not already covered by fields

§acquisition: Acquisition

A description of how the spectrum was acquired including time, scan windows, and more

§precursor: Option<Precursor>

The parent ion or ions and their isolation and activation description

Implementations§

Source§

impl SpectrumDescription

Source

pub fn new( id: String, index: usize, ms_level: u8, polarity: ScanPolarity, signal_continuity: SignalContinuity, params: Vec<Param>, acquisition: Acquisition, precursor: Option<Precursor>, ) -> SpectrumDescription

Source

pub fn title(&self) -> Option<Cow<'_, str>>

Find a parameter by its CURIE

Trait Implementations§

Source§

impl Clone for SpectrumDescription

Source§

fn clone(&self) -> SpectrumDescription

Returns a duplicate 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 Debug for SpectrumDescription

Source§

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

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

impl Default for SpectrumDescription

Source§

fn default() -> SpectrumDescription

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

impl From<IonMobilityFrameDescription> for SpectrumDescription

Source§

fn from(value: IonMobilityFrameDescription) -> SpectrumDescription

Converts to this type from the input type.
Source§

impl From<SpectrumDescription> for IonMobilityFrameDescription

Source§

fn from(value: SpectrumDescription) -> IonMobilityFrameDescription

Converts to this type from the input type.
Source§

impl ParamDescribed for SpectrumDescription

Source§

fn params(&self) -> &[Param]

Obtain an immutable slice over the encapsulated Param list
Source§

fn params_mut(&mut self) -> &mut Vec<Param>

Obtain an mutable slice over the encapsulated Param list
Source§

fn add_param(&mut self, param: Param)

Add a new Param to the entity
Source§

fn extend_params(&mut self, it: impl IntoIterator<Item = Param>)

Add all parameters from an iterator of Param to the entity
Source§

fn remove_param(&mut self, index: usize) -> Param

Remove the ith Param from the entity.
Source§

fn get_param_by_name(&self, name: &str) -> Option<&Param>

Find the first Param whose name matches name
Source§

fn get_param_by_curie(&self, curie: &CURIE) -> Option<&Param>

Find the first Param whose CURIE matches curie
Source§

fn get_param_by_accession(&self, accession: &str) -> Option<&Param>

Find the first Param whose Param::accession matches accession Read more
Source§

fn iter_params(&self) -> Iter<'_, Param>

Iterate over the encapsulated parameter list
Source§

fn iter_params_mut(&mut self) -> IterMut<'_, Param>

Iterate mutably over the encapsulated parameter list
Source§

impl PartialEq for SpectrumDescription

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for SpectrumDescription

Auto Trait Implementations§

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

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.