Struct mzdata::meta::InstrumentConfiguration
source · pub struct InstrumentConfiguration {
pub components: Vec<Component>,
pub params: ParamList,
pub software_reference: String,
pub id: u32,
}
Expand description
A series of mass spectrometer components that together were engaged to acquire a mass spectrum
Fields§
§components: Vec<Component>
The set of components involved
params: ParamList
A set of parameters that describe the instrument such as the model name or serial number
software_reference: String
A reference to the data acquisition software involved in processing this configuration
id: u32
A unique identifier translated to an ordinal identifying this configuration
Implementations§
source§impl InstrumentConfiguration
impl InstrumentConfiguration
sourcepub fn new_component(&mut self, component_type: ComponentType) -> &mut Component
pub fn new_component(&mut self, component_type: ComponentType) -> &mut Component
Add a new Component
to the configuration, added at the end of the list
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
sourcepub fn push(&mut self, value: Component)
pub fn push(&mut self, value: Component)
Add a new Component
to the end of the list, setting the Component::order
field
accordingly.
pub fn iter(&self) -> Iter<'_, Component>
pub fn last(&self) -> Option<&Component>
pub fn last_mut(&mut self) -> Option<&mut Component>
Trait Implementations§
source§impl Clone for InstrumentConfiguration
impl Clone for InstrumentConfiguration
source§fn clone(&self) -> InstrumentConfiguration
fn clone(&self) -> InstrumentConfiguration
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 Debug for InstrumentConfiguration
impl Debug for InstrumentConfiguration
source§impl Default for InstrumentConfiguration
impl Default for InstrumentConfiguration
source§fn default() -> InstrumentConfiguration
fn default() -> InstrumentConfiguration
Returns the “default value” for a type. Read more
source§impl ParamDescribed for InstrumentConfiguration
impl ParamDescribed for InstrumentConfiguration
source§fn params_mut(&mut self) -> &mut ParamList
fn params_mut(&mut self) -> &mut ParamList
Obtain an mutable slice over the encapsulated
Param
listsource§fn extend_params(&mut self, it: impl IntoIterator<Item = Param>)
fn extend_params(&mut self, it: impl IntoIterator<Item = Param>)
Add all parameters from an iterator of
Param
to the entitysource§fn get_param_by_name(&self, name: &str) -> Option<&Param>
fn get_param_by_name(&self, name: &str) -> Option<&Param>
Find the first
Param
whose name matches name
source§fn iter_params(&self) -> Iter<'_, Param>
fn iter_params(&self) -> Iter<'_, Param>
Iterate over the encapsulated parameter list
source§fn iter_params_mut(&mut self) -> IterMut<'_, Param>
fn iter_params_mut(&mut self) -> IterMut<'_, Param>
Iterate mutably over the encapsulated parameter list
source§impl PartialEq for InstrumentConfiguration
impl PartialEq for InstrumentConfiguration
source§fn eq(&self, other: &InstrumentConfiguration) -> bool
fn eq(&self, other: &InstrumentConfiguration) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for InstrumentConfiguration
impl StructuralPartialEq for InstrumentConfiguration
Auto Trait Implementations§
impl Freeze for InstrumentConfiguration
impl RefUnwindSafe for InstrumentConfiguration
impl Send for InstrumentConfiguration
impl Sync for InstrumentConfiguration
impl Unpin for InstrumentConfiguration
impl UnwindSafe for InstrumentConfiguration
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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.