Skip to main content

mzdata_meta/
scan_settings.rs

1use crate::params::{Param, ParamDescribed};
2
3
4/// Description of the acquisition settings of the instrument prior to the start of the run
5#[derive(Debug, Default, Clone, )]
6pub struct ScanSettings {
7    /// A unique identifier
8    pub id: String,
9    /// List with the source files containing the acquisition settings
10    pub source_file_refs: Vec<String>,
11    /// Target list (or 'inclusion list') configured prior to the run
12    pub targets: Vec<Vec<Param>>,
13    /// The controlled vocabulary and user parameters of the settings
14    pub params: Vec<Param>,
15}
16
17impl ScanSettings {
18    pub fn new(id: String, params: Vec<Param>, source_file_refs: Vec<String>, targets: Vec<Vec<Param>>) -> Self {
19        Self { id, params, source_file_refs, targets }
20    }
21}
22
23impl ParamDescribed for ScanSettings {
24    fn params(&self) -> &[Param] {
25        &self.params
26    }
27
28    fn params_mut(&mut self) -> &mut crate::params::ParamList {
29        &mut self.params
30    }
31}