Skip to main content

PrecursorInfo

Struct PrecursorInfo 

Source
#[non_exhaustive]
pub struct PrecursorInfo { pub target_mz: Option<f64>, pub selected_mz: Option<f64>, pub isolation_width: Option<f64>, pub charge: Option<i32>, pub intensity: Option<f64>, pub collision_energy: Option<f64>, pub ce_is_nce: bool, pub precursor_native_id: Option<String>, pub activation: Option<Activation>, pub analyzer: Option<Analyzer>, pub ccs: Option<f64>, }
Expand description

Precursor metadata for an MS2+ spectrum.

Build with PrecursorInfo::default() and the with_* setters.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§target_mz: Option<f64>

Isolation-window center m/z (target).

§selected_mz: Option<f64>

Monoisotopic-resolved precursor m/z (selected ion).

§isolation_width: Option<f64>

Total isolation width in m/z. The mzML writer splits this into symmetric lower/upper offsets around target_mz.

§charge: Option<i32>

Precursor charge state.

§intensity: Option<f64>

Precursor intensity (when known).

§collision_energy: Option<f64>

Collision energy. Interpretation depends on ce_is_nce.

§ce_is_nce: bool

true if collision_energy is normalized (NCE %); false for eV.

§precursor_native_id: Option<String>

Native ID of the precursor scan when known. Vendors should populate this with the same string they will use as the native_id for that MS1 spectrum, so mzML spectrumRef lookups round-trip cleanly.

§activation: Option<Activation>

Activation (dissociation) method.

§analyzer: Option<Analyzer>

Analyzer that recorded the precursor scan; needed by mzML to disambiguate CID vs beam-type CID on FTMS instruments.

§ccs: Option<f64>

Collision cross-sectional area of the selected ion, in square angstroms. Derived from ion-mobility measurements (Bruker 1/K0, Waters drift time, etc); vendors that only expose raw mobility should convert before populating this rather than leaving it for downstream consumers to guess a calibration.

Implementations§

Source§

impl PrecursorInfo

Source

pub fn with_target_mz(self, value: impl Into<Option<f64>>) -> Self

Set target_mz. Accepts a value or an Option.

Source

pub fn with_selected_mz(self, value: impl Into<Option<f64>>) -> Self

Set selected_mz. Accepts a value or an Option.

Source

pub fn with_isolation_width(self, value: impl Into<Option<f64>>) -> Self

Set isolation_width. Accepts a value or an Option.

Source

pub fn with_charge(self, value: impl Into<Option<i32>>) -> Self

Set charge. Accepts a value or an Option.

Source

pub fn with_intensity(self, value: impl Into<Option<f64>>) -> Self

Set intensity. Accepts a value or an Option.

Source

pub fn with_collision_energy(self, value: impl Into<Option<f64>>) -> Self

Set collision_energy. Accepts a value or an Option.

Source

pub fn with_ce_is_nce(self, value: bool) -> Self

Set ce_is_nce.

Source

pub fn with_precursor_native_id(self, value: impl Into<Option<String>>) -> Self

Set precursor_native_id. Accepts a value or an Option.

Source

pub fn with_activation(self, value: impl Into<Option<Activation>>) -> Self

Set activation. Accepts a value or an Option.

Source

pub fn with_analyzer(self, value: impl Into<Option<Analyzer>>) -> Self

Set analyzer. Accepts a value or an Option.

Source

pub fn with_ccs(self, value: impl Into<Option<f64>>) -> Self

Set ccs. Accepts a value or an Option.

Trait Implementations§

Source§

impl Clone for PrecursorInfo

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 Debug for PrecursorInfo

Source§

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

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

impl Default for PrecursorInfo

Source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for PrecursorInfo

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for PrecursorInfo

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 Serialize for PrecursorInfo

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for PrecursorInfo

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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.