openmassspec_core/lib.rs
1//! `openmassspec-core` is the shared foundation for the open Rust mass-spec
2//! parsers (`opentfraw`, `opentimstdf`, `openwraw`).
3//!
4//! It exposes:
5//!
6//! * Vendor-neutral spectrum / chromatogram / run records:
7//! [`SpectrumRecord`], [`PrecursorInfo`], [`ChromatogramRecord`],
8//! [`RunMetadata`], [`CvTerm`].
9//! * Shared enums: [`Polarity`], [`ScanMode`], [`Analyzer`], [`MsPower`],
10//! [`Activation`].
11//! * A trait every vendor parser implements: [`SpectrumSource`].
12//! * One canonical mzML 1.1.0 writer: [`write_mzml`] and
13//! [`write_indexed_mzml`].
14//! * A streaming profile-to-centroid transform, [`Centroided`], that wraps
15//! any `SpectrumSource`.
16//!
17//! Each vendor crate is a standalone tool (a user can pull in `opentfraw`
18//! alone and get parsing **and** mzML export); `openmassspec-core` is the
19//! shared vocabulary that keeps the three parsers in lock-step.
20
21mod centroid;
22mod enums;
23mod error;
24mod mzml;
25mod source;
26mod types;
27
28#[cfg(feature = "arrow")]
29pub mod arrow;
30pub mod conformance;
31
32pub use centroid::Centroided;
33pub use enums::{Activation, Analyzer, MobilityArrayKind, MsPower, Polarity, ScanMode};
34pub use error::{Error, Result};
35pub use mzml::{write_indexed_mzml, write_mzml};
36pub use source::SpectrumSource;
37pub use types::{ChromatogramRecord, CvTerm, PrecursorInfo, RunMetadata, SpectrumRecord};
38
39/// Crate version (set from `Cargo.toml`).
40pub const VERSION: &str = env!("CARGO_PKG_VERSION");