Struct mzdata::io::mzml::FileMetadataBuilder

source ·
pub struct FileMetadataBuilder<'a> {
    pub file_description: FileDescription,
    pub instrument_configurations: Vec<InstrumentConfiguration>,
    pub softwares: Vec<Software>,
    pub data_processings: Vec<DataProcessing>,
    pub reference_param_groups: HashMap<String, Vec<Param>>,
    pub last_group: String,
    pub run_id: Option<String>,
    pub default_instrument_config: Option<u32>,
    pub default_source_file: Option<String>,
    pub start_timestamp: Option<DateTime<FixedOffset>>,
    pub num_spectra: Option<u64>,
    pub default_data_processing: Option<String>,
    /* private fields */
}
Expand description

A SAX-style parser for building up the metadata section prior to the <run> element of an mzML file.

Fields§

§file_description: FileDescription§instrument_configurations: Vec<InstrumentConfiguration>§softwares: Vec<Software>§data_processings: Vec<DataProcessing>§reference_param_groups: HashMap<String, Vec<Param>>§last_group: String§run_id: Option<String>§default_instrument_config: Option<u32>§default_source_file: Option<String>§start_timestamp: Option<DateTime<FixedOffset>>§num_spectra: Option<u64>§default_data_processing: Option<String>

Implementations§

source§

impl<'a> FileMetadataBuilder<'a>

source

pub fn start_element( &mut self, event: &BytesStart<'_>, state: MzMLParserState ) -> Result<MzMLParserState, MzMLParserError>

source

pub fn fill_param_into(&mut self, param: Param, state: MzMLParserState)

source

pub fn empty_element( &mut self, event: &BytesStart<'_>, state: MzMLParserState, reader_position: usize ) -> Result<MzMLParserState, MzMLParserError>

source

pub fn end_element( &mut self, event: &BytesEnd<'_>, state: MzMLParserState ) -> Result<MzMLParserState, MzMLParserError>

source

pub fn text( &mut self, _event: &BytesText<'_>, state: MzMLParserState ) -> Result<MzMLParserState, MzMLParserError>

Trait Implementations§

source§

impl<'a> CVParamParse for FileMetadataBuilder<'a>

source§

fn handle_param_borrowed<'inner, 'outer: 'inner + 'event, 'event: 'inner>( event: &'event BytesStart<'event>, reader_position: usize, state: MzMLParserState ) -> Result<ParamCow<'inner>, MzMLParserError>

source§

fn handle_param( event: &BytesStart<'_>, reader_position: usize, state: MzMLParserState ) -> Result<Param, MzMLParserError>

source§

impl<'a> Debug for FileMetadataBuilder<'a>

source§

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

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

impl<'a> Default for FileMetadataBuilder<'a>

source§

fn default() -> FileMetadataBuilder<'a>

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

impl<'a> XMLParseBase for FileMetadataBuilder<'a>

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