use core::mem;
use core::cmp::Ordering;
extern crate flatbuffers;
use self::flatbuffers::{EndianScalar, Follow};
#[allow(unused_imports, dead_code)]
pub mod librawfilereader {
use core::mem;
use core::cmp::Ordering;
extern crate flatbuffers;
use self::flatbuffers::{EndianScalar, Follow};
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
pub const ENUM_MIN_POLARITY: i8 = -1;
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
pub const ENUM_MAX_POLARITY: i8 = 1;
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
#[allow(non_camel_case_types)]
pub const ENUM_VALUES_POLARITY: [Polarity; 3] = [
Polarity::Negative,
Polarity::Unknown,
Polarity::Positive,
];
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
#[repr(transparent)]
pub struct Polarity(pub i8);
#[allow(non_upper_case_globals)]
impl Polarity {
pub const Negative: Self = Self(-1);
pub const Unknown: Self = Self(0);
pub const Positive: Self = Self(1);
pub const ENUM_MIN: i8 = -1;
pub const ENUM_MAX: i8 = 1;
pub const ENUM_VALUES: &'static [Self] = &[
Self::Negative,
Self::Unknown,
Self::Positive,
];
pub fn variant_name(self) -> Option<&'static str> {
match self {
Self::Negative => Some("Negative"),
Self::Unknown => Some("Unknown"),
Self::Positive => Some("Positive"),
_ => None,
}
}
}
impl core::fmt::Debug for Polarity {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
if let Some(name) = self.variant_name() {
f.write_str(name)
} else {
f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
}
}
}
impl<'a> flatbuffers::Follow<'a> for Polarity {
type Inner = Self;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
Self(b)
}
}
impl flatbuffers::Push for Polarity {
type Output = Polarity;
#[inline]
unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
flatbuffers::emplace_scalar::<i8>(dst, self.0);
}
}
impl flatbuffers::EndianScalar for Polarity {
type Scalar = i8;
#[inline]
fn to_little_endian(self) -> i8 {
self.0.to_le()
}
#[inline]
#[allow(clippy::wrong_self_convention)]
fn from_little_endian(v: i8) -> Self {
let b = i8::from_le(v);
Self(b)
}
}
impl<'a> flatbuffers::Verifiable for Polarity {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
i8::run_verifier(v, pos)
}
}
impl flatbuffers::SimpleToVerifyInSlice for Polarity {}
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
pub const ENUM_MIN_SPECTRUM_MODE: i8 = 0;
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
pub const ENUM_MAX_SPECTRUM_MODE: i8 = 2;
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
#[allow(non_camel_case_types)]
pub const ENUM_VALUES_SPECTRUM_MODE: [SpectrumMode; 3] = [
SpectrumMode::Unknown,
SpectrumMode::Centroid,
SpectrumMode::Profile,
];
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
#[repr(transparent)]
pub struct SpectrumMode(pub i8);
#[allow(non_upper_case_globals)]
impl SpectrumMode {
pub const Unknown: Self = Self(0);
pub const Centroid: Self = Self(1);
pub const Profile: Self = Self(2);
pub const ENUM_MIN: i8 = 0;
pub const ENUM_MAX: i8 = 2;
pub const ENUM_VALUES: &'static [Self] = &[
Self::Unknown,
Self::Centroid,
Self::Profile,
];
pub fn variant_name(self) -> Option<&'static str> {
match self {
Self::Unknown => Some("Unknown"),
Self::Centroid => Some("Centroid"),
Self::Profile => Some("Profile"),
_ => None,
}
}
}
impl core::fmt::Debug for SpectrumMode {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
if let Some(name) = self.variant_name() {
f.write_str(name)
} else {
f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
}
}
}
impl<'a> flatbuffers::Follow<'a> for SpectrumMode {
type Inner = Self;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
Self(b)
}
}
impl flatbuffers::Push for SpectrumMode {
type Output = SpectrumMode;
#[inline]
unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
flatbuffers::emplace_scalar::<i8>(dst, self.0);
}
}
impl flatbuffers::EndianScalar for SpectrumMode {
type Scalar = i8;
#[inline]
fn to_little_endian(self) -> i8 {
self.0.to_le()
}
#[inline]
#[allow(clippy::wrong_self_convention)]
fn from_little_endian(v: i8) -> Self {
let b = i8::from_le(v);
Self(b)
}
}
impl<'a> flatbuffers::Verifiable for SpectrumMode {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
i8::run_verifier(v, pos)
}
}
impl flatbuffers::SimpleToVerifyInSlice for SpectrumMode {}
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
pub const ENUM_MIN_DISSOCIATION_METHOD: u8 = 0;
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
pub const ENUM_MAX_DISSOCIATION_METHOD: u8 = 64;
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
#[allow(non_camel_case_types)]
pub const ENUM_VALUES_DISSOCIATION_METHOD: [DissociationMethod; 12] = [
DissociationMethod::Unknown,
DissociationMethod::CID,
DissociationMethod::HCD,
DissociationMethod::ETD,
DissociationMethod::ETCID,
DissociationMethod::ETHCD,
DissociationMethod::ECD,
DissociationMethod::ECCID,
DissociationMethod::ECHCD,
DissociationMethod::NETD,
DissociationMethod::PTD,
DissociationMethod::MPD,
];
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
#[repr(transparent)]
pub struct DissociationMethod(pub u8);
#[allow(non_upper_case_globals)]
impl DissociationMethod {
pub const Unknown: Self = Self(0);
pub const CID: Self = Self(1);
pub const HCD: Self = Self(2);
pub const ETD: Self = Self(4);
pub const ETCID: Self = Self(5);
pub const ETHCD: Self = Self(6);
pub const ECD: Self = Self(8);
pub const ECCID: Self = Self(9);
pub const ECHCD: Self = Self(10);
pub const NETD: Self = Self(16);
pub const PTD: Self = Self(32);
pub const MPD: Self = Self(64);
pub const ENUM_MIN: u8 = 0;
pub const ENUM_MAX: u8 = 64;
pub const ENUM_VALUES: &'static [Self] = &[
Self::Unknown,
Self::CID,
Self::HCD,
Self::ETD,
Self::ETCID,
Self::ETHCD,
Self::ECD,
Self::ECCID,
Self::ECHCD,
Self::NETD,
Self::PTD,
Self::MPD,
];
pub fn variant_name(self) -> Option<&'static str> {
match self {
Self::Unknown => Some("Unknown"),
Self::CID => Some("CID"),
Self::HCD => Some("HCD"),
Self::ETD => Some("ETD"),
Self::ETCID => Some("ETCID"),
Self::ETHCD => Some("ETHCD"),
Self::ECD => Some("ECD"),
Self::ECCID => Some("ECCID"),
Self::ECHCD => Some("ECHCD"),
Self::NETD => Some("NETD"),
Self::PTD => Some("PTD"),
Self::MPD => Some("MPD"),
_ => None,
}
}
}
impl core::fmt::Debug for DissociationMethod {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
if let Some(name) = self.variant_name() {
f.write_str(name)
} else {
f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
}
}
}
impl<'a> flatbuffers::Follow<'a> for DissociationMethod {
type Inner = Self;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = flatbuffers::read_scalar_at::<u8>(buf, loc);
Self(b)
}
}
impl flatbuffers::Push for DissociationMethod {
type Output = DissociationMethod;
#[inline]
unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
flatbuffers::emplace_scalar::<u8>(dst, self.0);
}
}
impl flatbuffers::EndianScalar for DissociationMethod {
type Scalar = u8;
#[inline]
fn to_little_endian(self) -> u8 {
self.0.to_le()
}
#[inline]
#[allow(clippy::wrong_self_convention)]
fn from_little_endian(v: u8) -> Self {
let b = u8::from_le(v);
Self(b)
}
}
impl<'a> flatbuffers::Verifiable for DissociationMethod {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
u8::run_verifier(v, pos)
}
}
impl flatbuffers::SimpleToVerifyInSlice for DissociationMethod {}
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
pub const ENUM_MIN_MASS_ANALYZER: u8 = 0;
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
pub const ENUM_MAX_MASS_ANALYZER: u8 = 7;
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
#[allow(non_camel_case_types)]
pub const ENUM_VALUES_MASS_ANALYZER: [MassAnalyzer; 8] = [
MassAnalyzer::Unknown,
MassAnalyzer::ITMS,
MassAnalyzer::TQMS,
MassAnalyzer::SQMS,
MassAnalyzer::TOFMS,
MassAnalyzer::FTMS,
MassAnalyzer::Sector,
MassAnalyzer::ASTMS,
];
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
#[repr(transparent)]
pub struct MassAnalyzer(pub u8);
#[allow(non_upper_case_globals)]
impl MassAnalyzer {
pub const Unknown: Self = Self(0);
pub const ITMS: Self = Self(1);
pub const TQMS: Self = Self(2);
pub const SQMS: Self = Self(3);
pub const TOFMS: Self = Self(4);
pub const FTMS: Self = Self(5);
pub const Sector: Self = Self(6);
pub const ASTMS: Self = Self(7);
pub const ENUM_MIN: u8 = 0;
pub const ENUM_MAX: u8 = 7;
pub const ENUM_VALUES: &'static [Self] = &[
Self::Unknown,
Self::ITMS,
Self::TQMS,
Self::SQMS,
Self::TOFMS,
Self::FTMS,
Self::Sector,
Self::ASTMS,
];
pub fn variant_name(self) -> Option<&'static str> {
match self {
Self::Unknown => Some("Unknown"),
Self::ITMS => Some("ITMS"),
Self::TQMS => Some("TQMS"),
Self::SQMS => Some("SQMS"),
Self::TOFMS => Some("TOFMS"),
Self::FTMS => Some("FTMS"),
Self::Sector => Some("Sector"),
Self::ASTMS => Some("ASTMS"),
_ => None,
}
}
}
impl core::fmt::Debug for MassAnalyzer {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
if let Some(name) = self.variant_name() {
f.write_str(name)
} else {
f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
}
}
}
impl<'a> flatbuffers::Follow<'a> for MassAnalyzer {
type Inner = Self;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = flatbuffers::read_scalar_at::<u8>(buf, loc);
Self(b)
}
}
impl flatbuffers::Push for MassAnalyzer {
type Output = MassAnalyzer;
#[inline]
unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
flatbuffers::emplace_scalar::<u8>(dst, self.0);
}
}
impl flatbuffers::EndianScalar for MassAnalyzer {
type Scalar = u8;
#[inline]
fn to_little_endian(self) -> u8 {
self.0.to_le()
}
#[inline]
#[allow(clippy::wrong_self_convention)]
fn from_little_endian(v: u8) -> Self {
let b = u8::from_le(v);
Self(b)
}
}
impl<'a> flatbuffers::Verifiable for MassAnalyzer {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
u8::run_verifier(v, pos)
}
}
impl flatbuffers::SimpleToVerifyInSlice for MassAnalyzer {}
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
pub const ENUM_MIN_MSORDER: i16 = -3;
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
pub const ENUM_MAX_MSORDER: i16 = 999;
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
#[allow(non_camel_case_types)]
pub const ENUM_VALUES_MSORDER: [MSOrder; 15] = [
MSOrder::NeutralGain,
MSOrder::NeutralLoss,
MSOrder::ParentScan,
MSOrder::Any,
MSOrder::MS,
MSOrder::MS2,
MSOrder::MS3,
MSOrder::MS4,
MSOrder::MS5,
MSOrder::MS6,
MSOrder::MS7,
MSOrder::MS8,
MSOrder::MS9,
MSOrder::MS10,
MSOrder::Unknown,
];
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
#[repr(transparent)]
pub struct MSOrder(pub i16);
#[allow(non_upper_case_globals)]
impl MSOrder {
pub const NeutralGain: Self = Self(-3);
pub const NeutralLoss: Self = Self(-2);
pub const ParentScan: Self = Self(-1);
pub const Any: Self = Self(0);
pub const MS: Self = Self(1);
pub const MS2: Self = Self(2);
pub const MS3: Self = Self(3);
pub const MS4: Self = Self(4);
pub const MS5: Self = Self(5);
pub const MS6: Self = Self(6);
pub const MS7: Self = Self(7);
pub const MS8: Self = Self(8);
pub const MS9: Self = Self(9);
pub const MS10: Self = Self(10);
pub const Unknown: Self = Self(999);
pub const ENUM_MIN: i16 = -3;
pub const ENUM_MAX: i16 = 999;
pub const ENUM_VALUES: &'static [Self] = &[
Self::NeutralGain,
Self::NeutralLoss,
Self::ParentScan,
Self::Any,
Self::MS,
Self::MS2,
Self::MS3,
Self::MS4,
Self::MS5,
Self::MS6,
Self::MS7,
Self::MS8,
Self::MS9,
Self::MS10,
Self::Unknown,
];
pub fn variant_name(self) -> Option<&'static str> {
match self {
Self::NeutralGain => Some("NeutralGain"),
Self::NeutralLoss => Some("NeutralLoss"),
Self::ParentScan => Some("ParentScan"),
Self::Any => Some("Any"),
Self::MS => Some("MS"),
Self::MS2 => Some("MS2"),
Self::MS3 => Some("MS3"),
Self::MS4 => Some("MS4"),
Self::MS5 => Some("MS5"),
Self::MS6 => Some("MS6"),
Self::MS7 => Some("MS7"),
Self::MS8 => Some("MS8"),
Self::MS9 => Some("MS9"),
Self::MS10 => Some("MS10"),
Self::Unknown => Some("Unknown"),
_ => None,
}
}
}
impl core::fmt::Debug for MSOrder {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
if let Some(name) = self.variant_name() {
f.write_str(name)
} else {
f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
}
}
}
impl<'a> flatbuffers::Follow<'a> for MSOrder {
type Inner = Self;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = flatbuffers::read_scalar_at::<i16>(buf, loc);
Self(b)
}
}
impl flatbuffers::Push for MSOrder {
type Output = MSOrder;
#[inline]
unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
flatbuffers::emplace_scalar::<i16>(dst, self.0);
}
}
impl flatbuffers::EndianScalar for MSOrder {
type Scalar = i16;
#[inline]
fn to_little_endian(self) -> i16 {
self.0.to_le()
}
#[inline]
#[allow(clippy::wrong_self_convention)]
fn from_little_endian(v: i16) -> Self {
let b = i16::from_le(v);
Self(b)
}
}
impl<'a> flatbuffers::Verifiable for MSOrder {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
i16::run_verifier(v, pos)
}
}
impl flatbuffers::SimpleToVerifyInSlice for MSOrder {}
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
pub const ENUM_MIN_SCAN_MODE: u8 = 0;
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
pub const ENUM_MAX_SCAN_MODE: u8 = 7;
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
#[allow(non_camel_case_types)]
pub const ENUM_VALUES_SCAN_MODE: [ScanMode; 8] = [
ScanMode::Full,
ScanMode::Zoom,
ScanMode::Sim,
ScanMode::Srm,
ScanMode::Crm,
ScanMode::Any,
ScanMode::Q1Ms,
ScanMode::Q3Ms,
];
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
#[repr(transparent)]
pub struct ScanMode(pub u8);
#[allow(non_upper_case_globals)]
impl ScanMode {
pub const Full: Self = Self(0);
pub const Zoom: Self = Self(1);
pub const Sim: Self = Self(2);
pub const Srm: Self = Self(3);
pub const Crm: Self = Self(4);
pub const Any: Self = Self(5);
pub const Q1Ms: Self = Self(6);
pub const Q3Ms: Self = Self(7);
pub const ENUM_MIN: u8 = 0;
pub const ENUM_MAX: u8 = 7;
pub const ENUM_VALUES: &'static [Self] = &[
Self::Full,
Self::Zoom,
Self::Sim,
Self::Srm,
Self::Crm,
Self::Any,
Self::Q1Ms,
Self::Q3Ms,
];
pub fn variant_name(self) -> Option<&'static str> {
match self {
Self::Full => Some("Full"),
Self::Zoom => Some("Zoom"),
Self::Sim => Some("Sim"),
Self::Srm => Some("Srm"),
Self::Crm => Some("Crm"),
Self::Any => Some("Any"),
Self::Q1Ms => Some("Q1Ms"),
Self::Q3Ms => Some("Q3Ms"),
_ => None,
}
}
}
impl core::fmt::Debug for ScanMode {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
if let Some(name) = self.variant_name() {
f.write_str(name)
} else {
f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
}
}
}
impl<'a> flatbuffers::Follow<'a> for ScanMode {
type Inner = Self;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = flatbuffers::read_scalar_at::<u8>(buf, loc);
Self(b)
}
}
impl flatbuffers::Push for ScanMode {
type Output = ScanMode;
#[inline]
unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
flatbuffers::emplace_scalar::<u8>(dst, self.0);
}
}
impl flatbuffers::EndianScalar for ScanMode {
type Scalar = u8;
#[inline]
fn to_little_endian(self) -> u8 {
self.0.to_le()
}
#[inline]
#[allow(clippy::wrong_self_convention)]
fn from_little_endian(v: u8) -> Self {
let b = u8::from_le(v);
Self(b)
}
}
impl<'a> flatbuffers::Verifiable for ScanMode {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
u8::run_verifier(v, pos)
}
}
impl flatbuffers::SimpleToVerifyInSlice for ScanMode {}
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
pub const ENUM_MIN_IONIZATION_MODE: u8 = 0;
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
pub const ENUM_MAX_IONIZATION_MODE: u8 = 22;
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
#[allow(non_camel_case_types)]
pub const ENUM_VALUES_IONIZATION_MODE: [IonizationMode; 23] = [
IonizationMode::ElectronImpact,
IonizationMode::ChemicalIonization,
IonizationMode::FastAtomBombardment,
IonizationMode::ElectroSpray,
IonizationMode::AtmosphericPressureChemicalIonization,
IonizationMode::NanoSpray,
IonizationMode::ThermoSpray,
IonizationMode::FieldDesorption,
IonizationMode::MatrixAssistedLaserDesorptionIonization,
IonizationMode::GlowDischarge,
IonizationMode::Any,
IonizationMode::PaperSprayIonization,
IonizationMode::CardNanoSprayIonization,
IonizationMode::IonizationMode1,
IonizationMode::IonizationMode2,
IonizationMode::IonizationMode3,
IonizationMode::IonizationMode4,
IonizationMode::IonizationMode5,
IonizationMode::IonizationMode6,
IonizationMode::IonizationMode7,
IonizationMode::IonizationMode8,
IonizationMode::IonizationMode9,
IonizationMode::IonModeBeyondKnown,
];
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
#[repr(transparent)]
pub struct IonizationMode(pub u8);
#[allow(non_upper_case_globals)]
impl IonizationMode {
pub const ElectronImpact: Self = Self(0);
pub const ChemicalIonization: Self = Self(1);
pub const FastAtomBombardment: Self = Self(2);
pub const ElectroSpray: Self = Self(3);
pub const AtmosphericPressureChemicalIonization: Self = Self(4);
pub const NanoSpray: Self = Self(5);
pub const ThermoSpray: Self = Self(6);
pub const FieldDesorption: Self = Self(7);
pub const MatrixAssistedLaserDesorptionIonization: Self = Self(8);
pub const GlowDischarge: Self = Self(9);
pub const Any: Self = Self(10);
pub const PaperSprayIonization: Self = Self(11);
pub const CardNanoSprayIonization: Self = Self(12);
pub const IonizationMode1: Self = Self(13);
pub const IonizationMode2: Self = Self(14);
pub const IonizationMode3: Self = Self(15);
pub const IonizationMode4: Self = Self(16);
pub const IonizationMode5: Self = Self(17);
pub const IonizationMode6: Self = Self(18);
pub const IonizationMode7: Self = Self(19);
pub const IonizationMode8: Self = Self(20);
pub const IonizationMode9: Self = Self(21);
pub const IonModeBeyondKnown: Self = Self(22);
pub const ENUM_MIN: u8 = 0;
pub const ENUM_MAX: u8 = 22;
pub const ENUM_VALUES: &'static [Self] = &[
Self::ElectronImpact,
Self::ChemicalIonization,
Self::FastAtomBombardment,
Self::ElectroSpray,
Self::AtmosphericPressureChemicalIonization,
Self::NanoSpray,
Self::ThermoSpray,
Self::FieldDesorption,
Self::MatrixAssistedLaserDesorptionIonization,
Self::GlowDischarge,
Self::Any,
Self::PaperSprayIonization,
Self::CardNanoSprayIonization,
Self::IonizationMode1,
Self::IonizationMode2,
Self::IonizationMode3,
Self::IonizationMode4,
Self::IonizationMode5,
Self::IonizationMode6,
Self::IonizationMode7,
Self::IonizationMode8,
Self::IonizationMode9,
Self::IonModeBeyondKnown,
];
pub fn variant_name(self) -> Option<&'static str> {
match self {
Self::ElectronImpact => Some("ElectronImpact"),
Self::ChemicalIonization => Some("ChemicalIonization"),
Self::FastAtomBombardment => Some("FastAtomBombardment"),
Self::ElectroSpray => Some("ElectroSpray"),
Self::AtmosphericPressureChemicalIonization => Some("AtmosphericPressureChemicalIonization"),
Self::NanoSpray => Some("NanoSpray"),
Self::ThermoSpray => Some("ThermoSpray"),
Self::FieldDesorption => Some("FieldDesorption"),
Self::MatrixAssistedLaserDesorptionIonization => Some("MatrixAssistedLaserDesorptionIonization"),
Self::GlowDischarge => Some("GlowDischarge"),
Self::Any => Some("Any"),
Self::PaperSprayIonization => Some("PaperSprayIonization"),
Self::CardNanoSprayIonization => Some("CardNanoSprayIonization"),
Self::IonizationMode1 => Some("IonizationMode1"),
Self::IonizationMode2 => Some("IonizationMode2"),
Self::IonizationMode3 => Some("IonizationMode3"),
Self::IonizationMode4 => Some("IonizationMode4"),
Self::IonizationMode5 => Some("IonizationMode5"),
Self::IonizationMode6 => Some("IonizationMode6"),
Self::IonizationMode7 => Some("IonizationMode7"),
Self::IonizationMode8 => Some("IonizationMode8"),
Self::IonizationMode9 => Some("IonizationMode9"),
Self::IonModeBeyondKnown => Some("IonModeBeyondKnown"),
_ => None,
}
}
}
impl core::fmt::Debug for IonizationMode {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
if let Some(name) = self.variant_name() {
f.write_str(name)
} else {
f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
}
}
}
impl<'a> flatbuffers::Follow<'a> for IonizationMode {
type Inner = Self;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = flatbuffers::read_scalar_at::<u8>(buf, loc);
Self(b)
}
}
impl flatbuffers::Push for IonizationMode {
type Output = IonizationMode;
#[inline]
unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
flatbuffers::emplace_scalar::<u8>(dst, self.0);
}
}
impl flatbuffers::EndianScalar for IonizationMode {
type Scalar = u8;
#[inline]
fn to_little_endian(self) -> u8 {
self.0.to_le()
}
#[inline]
#[allow(clippy::wrong_self_convention)]
fn from_little_endian(v: u8) -> Self {
let b = u8::from_le(v);
Self(b)
}
}
impl<'a> flatbuffers::Verifiable for IonizationMode {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
u8::run_verifier(v, pos)
}
}
impl flatbuffers::SimpleToVerifyInSlice for IonizationMode {}
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
pub const ENUM_MIN_TRACE_TYPE_T: i16 = -1;
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
pub const ENUM_MAX_TRACE_TYPE_T: i16 = 50;
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
#[allow(non_camel_case_types)]
pub const ENUM_VALUES_TRACE_TYPE_T: [TraceTypeT; 46] = [
TraceTypeT::StartMSChromatogramTraces,
TraceTypeT::MassRange,
TraceTypeT::TIC,
TraceTypeT::BasePeak,
TraceTypeT::Fragment,
TraceTypeT::Custom,
TraceTypeT::PrecursorMass,
TraceTypeT::EndMSChromatogramTraces,
TraceTypeT::StartAnalogChromatogramTraces,
TraceTypeT::Analog1,
TraceTypeT::Analog2,
TraceTypeT::Analog3,
TraceTypeT::Analog4,
TraceTypeT::Analog5,
TraceTypeT::Analog6,
TraceTypeT::Analog7,
TraceTypeT::Analog8,
TraceTypeT::EndAnalogChromatogramTraces,
TraceTypeT::StartPDAChromatogramTraces,
TraceTypeT::WavelengthRange,
TraceTypeT::TotalAbsorbance,
TraceTypeT::SpectrumMax,
TraceTypeT::EndPDAChromatogramTraces,
TraceTypeT::StartUVChromatogramTraces,
TraceTypeT::ChannelA,
TraceTypeT::ChannelB,
TraceTypeT::ChannelC,
TraceTypeT::ChannelD,
TraceTypeT::ChannelE,
TraceTypeT::ChannelF,
TraceTypeT::ChannelG,
TraceTypeT::ChannelH,
TraceTypeT::EndUVChromatogramTraces,
TraceTypeT::StartPCA2DChromatogramTraces,
TraceTypeT::A2DChannel1,
TraceTypeT::A2DChannel2,
TraceTypeT::A2DChannel3,
TraceTypeT::ChromatogramA2DChannel3,
TraceTypeT::A2DChannel4,
TraceTypeT::ChromatogramA2DChannel4,
TraceTypeT::A2DChannel5,
TraceTypeT::A2DChannel6,
TraceTypeT::A2DChannel7,
TraceTypeT::A2DChannel8,
TraceTypeT::EndPCA2DChromatogramTraces,
TraceTypeT::EndAllChromatogramTraces,
];
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
#[repr(transparent)]
pub struct TraceTypeT(pub i16);
#[allow(non_upper_case_globals)]
impl TraceTypeT {
pub const StartMSChromatogramTraces: Self = Self(-1);
pub const MassRange: Self = Self(0);
pub const TIC: Self = Self(1);
pub const BasePeak: Self = Self(2);
pub const Fragment: Self = Self(3);
pub const Custom: Self = Self(4);
pub const PrecursorMass: Self = Self(5);
pub const EndMSChromatogramTraces: Self = Self(6);
pub const StartAnalogChromatogramTraces: Self = Self(10);
pub const Analog1: Self = Self(11);
pub const Analog2: Self = Self(12);
pub const Analog3: Self = Self(13);
pub const Analog4: Self = Self(14);
pub const Analog5: Self = Self(15);
pub const Analog6: Self = Self(16);
pub const Analog7: Self = Self(17);
pub const Analog8: Self = Self(18);
pub const EndAnalogChromatogramTraces: Self = Self(19);
pub const StartPDAChromatogramTraces: Self = Self(20);
pub const WavelengthRange: Self = Self(21);
pub const TotalAbsorbance: Self = Self(22);
pub const SpectrumMax: Self = Self(23);
pub const EndPDAChromatogramTraces: Self = Self(24);
pub const StartUVChromatogramTraces: Self = Self(30);
pub const ChannelA: Self = Self(31);
pub const ChannelB: Self = Self(32);
pub const ChannelC: Self = Self(33);
pub const ChannelD: Self = Self(34);
pub const ChannelE: Self = Self(35);
pub const ChannelF: Self = Self(36);
pub const ChannelG: Self = Self(37);
pub const ChannelH: Self = Self(38);
pub const EndUVChromatogramTraces: Self = Self(39);
pub const StartPCA2DChromatogramTraces: Self = Self(40);
pub const A2DChannel1: Self = Self(41);
pub const A2DChannel2: Self = Self(42);
pub const A2DChannel3: Self = Self(43);
pub const ChromatogramA2DChannel3: Self = Self(43);
pub const A2DChannel4: Self = Self(44);
pub const ChromatogramA2DChannel4: Self = Self(44);
pub const A2DChannel5: Self = Self(45);
pub const A2DChannel6: Self = Self(46);
pub const A2DChannel7: Self = Self(47);
pub const A2DChannel8: Self = Self(48);
pub const EndPCA2DChromatogramTraces: Self = Self(49);
pub const EndAllChromatogramTraces: Self = Self(50);
pub const ENUM_MIN: i16 = -1;
pub const ENUM_MAX: i16 = 50;
pub const ENUM_VALUES: &'static [Self] = &[
Self::StartMSChromatogramTraces,
Self::MassRange,
Self::TIC,
Self::BasePeak,
Self::Fragment,
Self::Custom,
Self::PrecursorMass,
Self::EndMSChromatogramTraces,
Self::StartAnalogChromatogramTraces,
Self::Analog1,
Self::Analog2,
Self::Analog3,
Self::Analog4,
Self::Analog5,
Self::Analog6,
Self::Analog7,
Self::Analog8,
Self::EndAnalogChromatogramTraces,
Self::StartPDAChromatogramTraces,
Self::WavelengthRange,
Self::TotalAbsorbance,
Self::SpectrumMax,
Self::EndPDAChromatogramTraces,
Self::StartUVChromatogramTraces,
Self::ChannelA,
Self::ChannelB,
Self::ChannelC,
Self::ChannelD,
Self::ChannelE,
Self::ChannelF,
Self::ChannelG,
Self::ChannelH,
Self::EndUVChromatogramTraces,
Self::StartPCA2DChromatogramTraces,
Self::A2DChannel1,
Self::A2DChannel2,
Self::A2DChannel3,
Self::ChromatogramA2DChannel3,
Self::A2DChannel4,
Self::ChromatogramA2DChannel4,
Self::A2DChannel5,
Self::A2DChannel6,
Self::A2DChannel7,
Self::A2DChannel8,
Self::EndPCA2DChromatogramTraces,
Self::EndAllChromatogramTraces,
];
pub fn variant_name(self) -> Option<&'static str> {
match self {
Self::StartMSChromatogramTraces => Some("StartMSChromatogramTraces"),
Self::MassRange => Some("MassRange"),
Self::TIC => Some("TIC"),
Self::BasePeak => Some("BasePeak"),
Self::Fragment => Some("Fragment"),
Self::Custom => Some("Custom"),
Self::PrecursorMass => Some("PrecursorMass"),
Self::EndMSChromatogramTraces => Some("EndMSChromatogramTraces"),
Self::StartAnalogChromatogramTraces => Some("StartAnalogChromatogramTraces"),
Self::Analog1 => Some("Analog1"),
Self::Analog2 => Some("Analog2"),
Self::Analog3 => Some("Analog3"),
Self::Analog4 => Some("Analog4"),
Self::Analog5 => Some("Analog5"),
Self::Analog6 => Some("Analog6"),
Self::Analog7 => Some("Analog7"),
Self::Analog8 => Some("Analog8"),
Self::EndAnalogChromatogramTraces => Some("EndAnalogChromatogramTraces"),
Self::StartPDAChromatogramTraces => Some("StartPDAChromatogramTraces"),
Self::WavelengthRange => Some("WavelengthRange"),
Self::TotalAbsorbance => Some("TotalAbsorbance"),
Self::SpectrumMax => Some("SpectrumMax"),
Self::EndPDAChromatogramTraces => Some("EndPDAChromatogramTraces"),
Self::StartUVChromatogramTraces => Some("StartUVChromatogramTraces"),
Self::ChannelA => Some("ChannelA"),
Self::ChannelB => Some("ChannelB"),
Self::ChannelC => Some("ChannelC"),
Self::ChannelD => Some("ChannelD"),
Self::ChannelE => Some("ChannelE"),
Self::ChannelF => Some("ChannelF"),
Self::ChannelG => Some("ChannelG"),
Self::ChannelH => Some("ChannelH"),
Self::EndUVChromatogramTraces => Some("EndUVChromatogramTraces"),
Self::StartPCA2DChromatogramTraces => Some("StartPCA2DChromatogramTraces"),
Self::A2DChannel1 => Some("A2DChannel1"),
Self::A2DChannel2 => Some("A2DChannel2"),
Self::A2DChannel3 => Some("A2DChannel3"),
Self::ChromatogramA2DChannel3 => Some("ChromatogramA2DChannel3"),
Self::A2DChannel4 => Some("A2DChannel4"),
Self::ChromatogramA2DChannel4 => Some("ChromatogramA2DChannel4"),
Self::A2DChannel5 => Some("A2DChannel5"),
Self::A2DChannel6 => Some("A2DChannel6"),
Self::A2DChannel7 => Some("A2DChannel7"),
Self::A2DChannel8 => Some("A2DChannel8"),
Self::EndPCA2DChromatogramTraces => Some("EndPCA2DChromatogramTraces"),
Self::EndAllChromatogramTraces => Some("EndAllChromatogramTraces"),
_ => None,
}
}
}
impl core::fmt::Debug for TraceTypeT {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
if let Some(name) = self.variant_name() {
f.write_str(name)
} else {
f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
}
}
}
impl<'a> flatbuffers::Follow<'a> for TraceTypeT {
type Inner = Self;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = flatbuffers::read_scalar_at::<i16>(buf, loc);
Self(b)
}
}
impl flatbuffers::Push for TraceTypeT {
type Output = TraceTypeT;
#[inline]
unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
flatbuffers::emplace_scalar::<i16>(dst, self.0);
}
}
impl flatbuffers::EndianScalar for TraceTypeT {
type Scalar = i16;
#[inline]
fn to_little_endian(self) -> i16 {
self.0.to_le()
}
#[inline]
#[allow(clippy::wrong_self_convention)]
fn from_little_endian(v: i16) -> Self {
let b = i16::from_le(v);
Self(b)
}
}
impl<'a> flatbuffers::Verifiable for TraceTypeT {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
i16::run_verifier(v, pos)
}
}
impl flatbuffers::SimpleToVerifyInSlice for TraceTypeT {}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq)]
pub struct InstrumentConfigurationT(pub [u8; 2]);
impl Default for InstrumentConfigurationT {
fn default() -> Self {
Self([0; 2])
}
}
impl core::fmt::Debug for InstrumentConfigurationT {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("InstrumentConfigurationT")
.field("mass_analyzer", &self.mass_analyzer())
.field("ionization_mode", &self.ionization_mode())
.finish()
}
}
impl flatbuffers::SimpleToVerifyInSlice for InstrumentConfigurationT {}
impl<'a> flatbuffers::Follow<'a> for InstrumentConfigurationT {
type Inner = &'a InstrumentConfigurationT;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
<&'a InstrumentConfigurationT>::follow(buf, loc)
}
}
impl<'a> flatbuffers::Follow<'a> for &'a InstrumentConfigurationT {
type Inner = &'a InstrumentConfigurationT;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
flatbuffers::follow_cast_ref::<InstrumentConfigurationT>(buf, loc)
}
}
impl<'b> flatbuffers::Push for InstrumentConfigurationT {
type Output = InstrumentConfigurationT;
#[inline]
unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
let src = ::core::slice::from_raw_parts(self as *const InstrumentConfigurationT as *const u8, <Self as flatbuffers::Push>::size());
dst.copy_from_slice(src);
}
#[inline]
fn alignment() -> flatbuffers::PushAlignment {
flatbuffers::PushAlignment::new(1)
}
}
impl<'a> flatbuffers::Verifiable for InstrumentConfigurationT {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.in_buffer::<Self>(pos)
}
}
impl<'a> InstrumentConfigurationT {
#[allow(clippy::too_many_arguments)]
pub fn new(
mass_analyzer: MassAnalyzer,
ionization_mode: IonizationMode,
) -> Self {
let mut s = Self([0; 2]);
s.set_mass_analyzer(mass_analyzer);
s.set_ionization_mode(ionization_mode);
s
}
pub fn mass_analyzer(&self) -> MassAnalyzer {
let mut mem = core::mem::MaybeUninit::<<MassAnalyzer as EndianScalar>::Scalar>::uninit();
EndianScalar::from_little_endian(unsafe {
core::ptr::copy_nonoverlapping(
self.0[0..].as_ptr(),
mem.as_mut_ptr() as *mut u8,
core::mem::size_of::<<MassAnalyzer as EndianScalar>::Scalar>(),
);
mem.assume_init()
})
}
pub fn set_mass_analyzer(&mut self, x: MassAnalyzer) {
let x_le = x.to_little_endian();
unsafe {
core::ptr::copy_nonoverlapping(
&x_le as *const _ as *const u8,
self.0[0..].as_mut_ptr(),
core::mem::size_of::<<MassAnalyzer as EndianScalar>::Scalar>(),
);
}
}
pub fn ionization_mode(&self) -> IonizationMode {
let mut mem = core::mem::MaybeUninit::<<IonizationMode as EndianScalar>::Scalar>::uninit();
EndianScalar::from_little_endian(unsafe {
core::ptr::copy_nonoverlapping(
self.0[1..].as_ptr(),
mem.as_mut_ptr() as *mut u8,
core::mem::size_of::<<IonizationMode as EndianScalar>::Scalar>(),
);
mem.assume_init()
})
}
pub fn set_ionization_mode(&mut self, x: IonizationMode) {
let x_le = x.to_little_endian();
unsafe {
core::ptr::copy_nonoverlapping(
&x_le as *const _ as *const u8,
self.0[1..].as_mut_ptr(),
core::mem::size_of::<<IonizationMode as EndianScalar>::Scalar>(),
);
}
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq)]
pub struct IsolationWindowT(pub [u8; 24]);
impl Default for IsolationWindowT {
fn default() -> Self {
Self([0; 24])
}
}
impl core::fmt::Debug for IsolationWindowT {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("IsolationWindowT")
.field("lower", &self.lower())
.field("target", &self.target())
.field("upper", &self.upper())
.finish()
}
}
impl flatbuffers::SimpleToVerifyInSlice for IsolationWindowT {}
impl<'a> flatbuffers::Follow<'a> for IsolationWindowT {
type Inner = &'a IsolationWindowT;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
<&'a IsolationWindowT>::follow(buf, loc)
}
}
impl<'a> flatbuffers::Follow<'a> for &'a IsolationWindowT {
type Inner = &'a IsolationWindowT;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
flatbuffers::follow_cast_ref::<IsolationWindowT>(buf, loc)
}
}
impl<'b> flatbuffers::Push for IsolationWindowT {
type Output = IsolationWindowT;
#[inline]
unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
let src = ::core::slice::from_raw_parts(self as *const IsolationWindowT as *const u8, <Self as flatbuffers::Push>::size());
dst.copy_from_slice(src);
}
#[inline]
fn alignment() -> flatbuffers::PushAlignment {
flatbuffers::PushAlignment::new(8)
}
}
impl<'a> flatbuffers::Verifiable for IsolationWindowT {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.in_buffer::<Self>(pos)
}
}
impl<'a> IsolationWindowT {
#[allow(clippy::too_many_arguments)]
pub fn new(
lower: f64,
target: f64,
upper: f64,
) -> Self {
let mut s = Self([0; 24]);
s.set_lower(lower);
s.set_target(target);
s.set_upper(upper);
s
}
pub fn lower(&self) -> f64 {
let mut mem = core::mem::MaybeUninit::<<f64 as EndianScalar>::Scalar>::uninit();
EndianScalar::from_little_endian(unsafe {
core::ptr::copy_nonoverlapping(
self.0[0..].as_ptr(),
mem.as_mut_ptr() as *mut u8,
core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
);
mem.assume_init()
})
}
pub fn set_lower(&mut self, x: f64) {
let x_le = x.to_little_endian();
unsafe {
core::ptr::copy_nonoverlapping(
&x_le as *const _ as *const u8,
self.0[0..].as_mut_ptr(),
core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
);
}
}
pub fn target(&self) -> f64 {
let mut mem = core::mem::MaybeUninit::<<f64 as EndianScalar>::Scalar>::uninit();
EndianScalar::from_little_endian(unsafe {
core::ptr::copy_nonoverlapping(
self.0[8..].as_ptr(),
mem.as_mut_ptr() as *mut u8,
core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
);
mem.assume_init()
})
}
pub fn set_target(&mut self, x: f64) {
let x_le = x.to_little_endian();
unsafe {
core::ptr::copy_nonoverlapping(
&x_le as *const _ as *const u8,
self.0[8..].as_mut_ptr(),
core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
);
}
}
pub fn upper(&self) -> f64 {
let mut mem = core::mem::MaybeUninit::<<f64 as EndianScalar>::Scalar>::uninit();
EndianScalar::from_little_endian(unsafe {
core::ptr::copy_nonoverlapping(
self.0[16..].as_ptr(),
mem.as_mut_ptr() as *mut u8,
core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
);
mem.assume_init()
})
}
pub fn set_upper(&mut self, x: f64) {
let x_le = x.to_little_endian();
unsafe {
core::ptr::copy_nonoverlapping(
&x_le as *const _ as *const u8,
self.0[16..].as_mut_ptr(),
core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
);
}
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq)]
pub struct ActivationT(pub [u8; 16]);
impl Default for ActivationT {
fn default() -> Self {
Self([0; 16])
}
}
impl core::fmt::Debug for ActivationT {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("ActivationT")
.field("dissociation_method", &self.dissociation_method())
.field("collision_energy", &self.collision_energy())
.finish()
}
}
impl flatbuffers::SimpleToVerifyInSlice for ActivationT {}
impl<'a> flatbuffers::Follow<'a> for ActivationT {
type Inner = &'a ActivationT;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
<&'a ActivationT>::follow(buf, loc)
}
}
impl<'a> flatbuffers::Follow<'a> for &'a ActivationT {
type Inner = &'a ActivationT;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
flatbuffers::follow_cast_ref::<ActivationT>(buf, loc)
}
}
impl<'b> flatbuffers::Push for ActivationT {
type Output = ActivationT;
#[inline]
unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
let src = ::core::slice::from_raw_parts(self as *const ActivationT as *const u8, <Self as flatbuffers::Push>::size());
dst.copy_from_slice(src);
}
#[inline]
fn alignment() -> flatbuffers::PushAlignment {
flatbuffers::PushAlignment::new(8)
}
}
impl<'a> flatbuffers::Verifiable for ActivationT {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.in_buffer::<Self>(pos)
}
}
impl<'a> ActivationT {
#[allow(clippy::too_many_arguments)]
pub fn new(
dissociation_method: DissociationMethod,
collision_energy: f64,
) -> Self {
let mut s = Self([0; 16]);
s.set_dissociation_method(dissociation_method);
s.set_collision_energy(collision_energy);
s
}
pub fn dissociation_method(&self) -> DissociationMethod {
let mut mem = core::mem::MaybeUninit::<<DissociationMethod as EndianScalar>::Scalar>::uninit();
EndianScalar::from_little_endian(unsafe {
core::ptr::copy_nonoverlapping(
self.0[0..].as_ptr(),
mem.as_mut_ptr() as *mut u8,
core::mem::size_of::<<DissociationMethod as EndianScalar>::Scalar>(),
);
mem.assume_init()
})
}
pub fn set_dissociation_method(&mut self, x: DissociationMethod) {
let x_le = x.to_little_endian();
unsafe {
core::ptr::copy_nonoverlapping(
&x_le as *const _ as *const u8,
self.0[0..].as_mut_ptr(),
core::mem::size_of::<<DissociationMethod as EndianScalar>::Scalar>(),
);
}
}
pub fn collision_energy(&self) -> f64 {
let mut mem = core::mem::MaybeUninit::<<f64 as EndianScalar>::Scalar>::uninit();
EndianScalar::from_little_endian(unsafe {
core::ptr::copy_nonoverlapping(
self.0[8..].as_ptr(),
mem.as_mut_ptr() as *mut u8,
core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
);
mem.assume_init()
})
}
pub fn set_collision_energy(&mut self, x: f64) {
let x_le = x.to_little_endian();
unsafe {
core::ptr::copy_nonoverlapping(
&x_le as *const _ as *const u8,
self.0[8..].as_mut_ptr(),
core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
);
}
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq)]
pub struct PrecursorT(pub [u8; 64]);
impl Default for PrecursorT {
fn default() -> Self {
Self([0; 64])
}
}
impl core::fmt::Debug for PrecursorT {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("PrecursorT")
.field("mz", &self.mz())
.field("intensity", &self.intensity())
.field("charge", &self.charge())
.field("parent_index", &self.parent_index())
.field("isolation_window", &self.isolation_window())
.field("activation", &self.activation())
.finish()
}
}
impl flatbuffers::SimpleToVerifyInSlice for PrecursorT {}
impl<'a> flatbuffers::Follow<'a> for PrecursorT {
type Inner = &'a PrecursorT;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
<&'a PrecursorT>::follow(buf, loc)
}
}
impl<'a> flatbuffers::Follow<'a> for &'a PrecursorT {
type Inner = &'a PrecursorT;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
flatbuffers::follow_cast_ref::<PrecursorT>(buf, loc)
}
}
impl<'b> flatbuffers::Push for PrecursorT {
type Output = PrecursorT;
#[inline]
unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
let src = ::core::slice::from_raw_parts(self as *const PrecursorT as *const u8, <Self as flatbuffers::Push>::size());
dst.copy_from_slice(src);
}
#[inline]
fn alignment() -> flatbuffers::PushAlignment {
flatbuffers::PushAlignment::new(8)
}
}
impl<'a> flatbuffers::Verifiable for PrecursorT {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.in_buffer::<Self>(pos)
}
}
impl<'a> PrecursorT {
#[allow(clippy::too_many_arguments)]
pub fn new(
mz: f64,
intensity: f32,
charge: i32,
parent_index: i32,
isolation_window: &IsolationWindowT,
activation: &ActivationT,
) -> Self {
let mut s = Self([0; 64]);
s.set_mz(mz);
s.set_intensity(intensity);
s.set_charge(charge);
s.set_parent_index(parent_index);
s.set_isolation_window(isolation_window);
s.set_activation(activation);
s
}
pub fn mz(&self) -> f64 {
let mut mem = core::mem::MaybeUninit::<<f64 as EndianScalar>::Scalar>::uninit();
EndianScalar::from_little_endian(unsafe {
core::ptr::copy_nonoverlapping(
self.0[0..].as_ptr(),
mem.as_mut_ptr() as *mut u8,
core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
);
mem.assume_init()
})
}
pub fn set_mz(&mut self, x: f64) {
let x_le = x.to_little_endian();
unsafe {
core::ptr::copy_nonoverlapping(
&x_le as *const _ as *const u8,
self.0[0..].as_mut_ptr(),
core::mem::size_of::<<f64 as EndianScalar>::Scalar>(),
);
}
}
pub fn intensity(&self) -> f32 {
let mut mem = core::mem::MaybeUninit::<<f32 as EndianScalar>::Scalar>::uninit();
EndianScalar::from_little_endian(unsafe {
core::ptr::copy_nonoverlapping(
self.0[8..].as_ptr(),
mem.as_mut_ptr() as *mut u8,
core::mem::size_of::<<f32 as EndianScalar>::Scalar>(),
);
mem.assume_init()
})
}
pub fn set_intensity(&mut self, x: f32) {
let x_le = x.to_little_endian();
unsafe {
core::ptr::copy_nonoverlapping(
&x_le as *const _ as *const u8,
self.0[8..].as_mut_ptr(),
core::mem::size_of::<<f32 as EndianScalar>::Scalar>(),
);
}
}
pub fn charge(&self) -> i32 {
let mut mem = core::mem::MaybeUninit::<<i32 as EndianScalar>::Scalar>::uninit();
EndianScalar::from_little_endian(unsafe {
core::ptr::copy_nonoverlapping(
self.0[12..].as_ptr(),
mem.as_mut_ptr() as *mut u8,
core::mem::size_of::<<i32 as EndianScalar>::Scalar>(),
);
mem.assume_init()
})
}
pub fn set_charge(&mut self, x: i32) {
let x_le = x.to_little_endian();
unsafe {
core::ptr::copy_nonoverlapping(
&x_le as *const _ as *const u8,
self.0[12..].as_mut_ptr(),
core::mem::size_of::<<i32 as EndianScalar>::Scalar>(),
);
}
}
pub fn parent_index(&self) -> i32 {
let mut mem = core::mem::MaybeUninit::<<i32 as EndianScalar>::Scalar>::uninit();
EndianScalar::from_little_endian(unsafe {
core::ptr::copy_nonoverlapping(
self.0[16..].as_ptr(),
mem.as_mut_ptr() as *mut u8,
core::mem::size_of::<<i32 as EndianScalar>::Scalar>(),
);
mem.assume_init()
})
}
pub fn set_parent_index(&mut self, x: i32) {
let x_le = x.to_little_endian();
unsafe {
core::ptr::copy_nonoverlapping(
&x_le as *const _ as *const u8,
self.0[16..].as_mut_ptr(),
core::mem::size_of::<<i32 as EndianScalar>::Scalar>(),
);
}
}
pub fn isolation_window(&self) -> &IsolationWindowT {
unsafe { &*(self.0[24..].as_ptr() as *const IsolationWindowT) }
}
#[allow(clippy::identity_op)]
pub fn set_isolation_window(&mut self, x: &IsolationWindowT) {
self.0[24..24 + 24].copy_from_slice(&x.0)
}
pub fn activation(&self) -> &ActivationT {
unsafe { &*(self.0[48..].as_ptr() as *const ActivationT) }
}
#[allow(clippy::identity_op)]
pub fn set_activation(&mut self, x: &ActivationT) {
self.0[48..48 + 16].copy_from_slice(&x.0)
}
}
pub enum FileDescriptionTOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct FileDescriptionT<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for FileDescriptionT<'a> {
type Inner = FileDescriptionT<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> FileDescriptionT<'a> {
pub const VT_CREATION_DATE: flatbuffers::VOffsetT = 4;
pub const VT_SAMPLE_ID: flatbuffers::VOffsetT = 6;
pub const VT_SOURCE_FILE: flatbuffers::VOffsetT = 8;
pub const VT_SPECTRA_PER_MS_LEVEL: flatbuffers::VOffsetT = 10;
pub const VT_TRAILER_HEADERS: flatbuffers::VOffsetT = 12;
pub const VT_SAMPLE_NAME: flatbuffers::VOffsetT = 14;
pub const VT_SAMPLE_VIAL: flatbuffers::VOffsetT = 16;
pub const VT_SAMPLE_COMMENT: flatbuffers::VOffsetT = 18;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
FileDescriptionT { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
args: &'args FileDescriptionTArgs<'args>
) -> flatbuffers::WIPOffset<FileDescriptionT<'bldr>> {
let mut builder = FileDescriptionTBuilder::new(_fbb);
if let Some(x) = args.sample_comment { builder.add_sample_comment(x); }
if let Some(x) = args.sample_vial { builder.add_sample_vial(x); }
if let Some(x) = args.sample_name { builder.add_sample_name(x); }
if let Some(x) = args.trailer_headers { builder.add_trailer_headers(x); }
if let Some(x) = args.spectra_per_ms_level { builder.add_spectra_per_ms_level(x); }
if let Some(x) = args.source_file { builder.add_source_file(x); }
if let Some(x) = args.sample_id { builder.add_sample_id(x); }
if let Some(x) = args.creation_date { builder.add_creation_date(x); }
builder.finish()
}
#[inline]
pub fn creation_date(&self) -> Option<&'a str> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FileDescriptionT::VT_CREATION_DATE, None)}
}
#[inline]
pub fn sample_id(&self) -> Option<&'a str> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FileDescriptionT::VT_SAMPLE_ID, None)}
}
#[inline]
pub fn source_file(&self) -> Option<&'a str> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FileDescriptionT::VT_SOURCE_FILE, None)}
}
#[inline]
pub fn spectra_per_ms_level(&self) -> Option<flatbuffers::Vector<'a, u32>> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u32>>>(FileDescriptionT::VT_SPECTRA_PER_MS_LEVEL, None)}
}
#[inline]
pub fn trailer_headers(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>(FileDescriptionT::VT_TRAILER_HEADERS, None)}
}
#[inline]
pub fn sample_name(&self) -> Option<&'a str> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FileDescriptionT::VT_SAMPLE_NAME, None)}
}
#[inline]
pub fn sample_vial(&self) -> Option<&'a str> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FileDescriptionT::VT_SAMPLE_VIAL, None)}
}
#[inline]
pub fn sample_comment(&self) -> Option<&'a str> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FileDescriptionT::VT_SAMPLE_COMMENT, None)}
}
}
impl flatbuffers::Verifiable for FileDescriptionT<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("creation_date", Self::VT_CREATION_DATE, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("sample_id", Self::VT_SAMPLE_ID, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("source_file", Self::VT_SOURCE_FILE, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u32>>>("spectra_per_ms_level", Self::VT_SPECTRA_PER_MS_LEVEL, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>>>("trailer_headers", Self::VT_TRAILER_HEADERS, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("sample_name", Self::VT_SAMPLE_NAME, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("sample_vial", Self::VT_SAMPLE_VIAL, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("sample_comment", Self::VT_SAMPLE_COMMENT, false)?
.finish();
Ok(())
}
}
pub struct FileDescriptionTArgs<'a> {
pub creation_date: Option<flatbuffers::WIPOffset<&'a str>>,
pub sample_id: Option<flatbuffers::WIPOffset<&'a str>>,
pub source_file: Option<flatbuffers::WIPOffset<&'a str>>,
pub spectra_per_ms_level: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u32>>>,
pub trailer_headers: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>,
pub sample_name: Option<flatbuffers::WIPOffset<&'a str>>,
pub sample_vial: Option<flatbuffers::WIPOffset<&'a str>>,
pub sample_comment: Option<flatbuffers::WIPOffset<&'a str>>,
}
impl<'a> Default for FileDescriptionTArgs<'a> {
#[inline]
fn default() -> Self {
FileDescriptionTArgs {
creation_date: None,
sample_id: None,
source_file: None,
spectra_per_ms_level: None,
trailer_headers: None,
sample_name: None,
sample_vial: None,
sample_comment: None,
}
}
}
pub struct FileDescriptionTBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> FileDescriptionTBuilder<'a, 'b, A> {
#[inline]
pub fn add_creation_date(&mut self, creation_date: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FileDescriptionT::VT_CREATION_DATE, creation_date);
}
#[inline]
pub fn add_sample_id(&mut self, sample_id: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FileDescriptionT::VT_SAMPLE_ID, sample_id);
}
#[inline]
pub fn add_source_file(&mut self, source_file: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FileDescriptionT::VT_SOURCE_FILE, source_file);
}
#[inline]
pub fn add_spectra_per_ms_level(&mut self, spectra_per_ms_level: flatbuffers::WIPOffset<flatbuffers::Vector<'b , u32>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FileDescriptionT::VT_SPECTRA_PER_MS_LEVEL, spectra_per_ms_level);
}
#[inline]
pub fn add_trailer_headers(&mut self, trailer_headers: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<&'b str>>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FileDescriptionT::VT_TRAILER_HEADERS, trailer_headers);
}
#[inline]
pub fn add_sample_name(&mut self, sample_name: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FileDescriptionT::VT_SAMPLE_NAME, sample_name);
}
#[inline]
pub fn add_sample_vial(&mut self, sample_vial: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FileDescriptionT::VT_SAMPLE_VIAL, sample_vial);
}
#[inline]
pub fn add_sample_comment(&mut self, sample_comment: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FileDescriptionT::VT_SAMPLE_COMMENT, sample_comment);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> FileDescriptionTBuilder<'a, 'b, A> {
let start = _fbb.start_table();
FileDescriptionTBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<FileDescriptionT<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for FileDescriptionT<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("FileDescriptionT");
ds.field("creation_date", &self.creation_date());
ds.field("sample_id", &self.sample_id());
ds.field("source_file", &self.source_file());
ds.field("spectra_per_ms_level", &self.spectra_per_ms_level());
ds.field("trailer_headers", &self.trailer_headers());
ds.field("sample_name", &self.sample_name());
ds.field("sample_vial", &self.sample_vial());
ds.field("sample_comment", &self.sample_comment());
ds.finish()
}
}
pub enum InstrumentModelTOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct InstrumentModelT<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for InstrumentModelT<'a> {
type Inner = InstrumentModelT<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> InstrumentModelT<'a> {
pub const VT_CONFIGURATIONS: flatbuffers::VOffsetT = 4;
pub const VT_NAME: flatbuffers::VOffsetT = 6;
pub const VT_MODEL: flatbuffers::VOffsetT = 8;
pub const VT_SERIAL_NUMBER: flatbuffers::VOffsetT = 10;
pub const VT_HARDWARE_VERSION: flatbuffers::VOffsetT = 12;
pub const VT_SOFTWARE_VERSION: flatbuffers::VOffsetT = 14;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
InstrumentModelT { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
args: &'args InstrumentModelTArgs<'args>
) -> flatbuffers::WIPOffset<InstrumentModelT<'bldr>> {
let mut builder = InstrumentModelTBuilder::new(_fbb);
if let Some(x) = args.software_version { builder.add_software_version(x); }
if let Some(x) = args.hardware_version { builder.add_hardware_version(x); }
if let Some(x) = args.serial_number { builder.add_serial_number(x); }
if let Some(x) = args.model { builder.add_model(x); }
if let Some(x) = args.name { builder.add_name(x); }
if let Some(x) = args.configurations { builder.add_configurations(x); }
builder.finish()
}
#[inline]
pub fn configurations(&self) -> Option<flatbuffers::Vector<'a, InstrumentConfigurationT>> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, InstrumentConfigurationT>>>(InstrumentModelT::VT_CONFIGURATIONS, None)}
}
#[inline]
pub fn name(&self) -> Option<&'a str> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(InstrumentModelT::VT_NAME, None)}
}
#[inline]
pub fn model(&self) -> Option<&'a str> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(InstrumentModelT::VT_MODEL, None)}
}
#[inline]
pub fn serial_number(&self) -> Option<&'a str> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(InstrumentModelT::VT_SERIAL_NUMBER, None)}
}
#[inline]
pub fn hardware_version(&self) -> Option<&'a str> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(InstrumentModelT::VT_HARDWARE_VERSION, None)}
}
#[inline]
pub fn software_version(&self) -> Option<&'a str> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(InstrumentModelT::VT_SOFTWARE_VERSION, None)}
}
}
impl flatbuffers::Verifiable for InstrumentModelT<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, InstrumentConfigurationT>>>("configurations", Self::VT_CONFIGURATIONS, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("model", Self::VT_MODEL, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("serial_number", Self::VT_SERIAL_NUMBER, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("hardware_version", Self::VT_HARDWARE_VERSION, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("software_version", Self::VT_SOFTWARE_VERSION, false)?
.finish();
Ok(())
}
}
pub struct InstrumentModelTArgs<'a> {
pub configurations: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, InstrumentConfigurationT>>>,
pub name: Option<flatbuffers::WIPOffset<&'a str>>,
pub model: Option<flatbuffers::WIPOffset<&'a str>>,
pub serial_number: Option<flatbuffers::WIPOffset<&'a str>>,
pub hardware_version: Option<flatbuffers::WIPOffset<&'a str>>,
pub software_version: Option<flatbuffers::WIPOffset<&'a str>>,
}
impl<'a> Default for InstrumentModelTArgs<'a> {
#[inline]
fn default() -> Self {
InstrumentModelTArgs {
configurations: None,
name: None,
model: None,
serial_number: None,
hardware_version: None,
software_version: None,
}
}
}
pub struct InstrumentModelTBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> InstrumentModelTBuilder<'a, 'b, A> {
#[inline]
pub fn add_configurations(&mut self, configurations: flatbuffers::WIPOffset<flatbuffers::Vector<'b , InstrumentConfigurationT>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(InstrumentModelT::VT_CONFIGURATIONS, configurations);
}
#[inline]
pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(InstrumentModelT::VT_NAME, name);
}
#[inline]
pub fn add_model(&mut self, model: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(InstrumentModelT::VT_MODEL, model);
}
#[inline]
pub fn add_serial_number(&mut self, serial_number: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(InstrumentModelT::VT_SERIAL_NUMBER, serial_number);
}
#[inline]
pub fn add_hardware_version(&mut self, hardware_version: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(InstrumentModelT::VT_HARDWARE_VERSION, hardware_version);
}
#[inline]
pub fn add_software_version(&mut self, software_version: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(InstrumentModelT::VT_SOFTWARE_VERSION, software_version);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> InstrumentModelTBuilder<'a, 'b, A> {
let start = _fbb.start_table();
InstrumentModelTBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<InstrumentModelT<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for InstrumentModelT<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("InstrumentModelT");
ds.field("configurations", &self.configurations());
ds.field("name", &self.name());
ds.field("model", &self.model());
ds.field("serial_number", &self.serial_number());
ds.field("hardware_version", &self.hardware_version());
ds.field("software_version", &self.software_version());
ds.finish()
}
}
pub enum SpectrumDataOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct SpectrumData<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for SpectrumData<'a> {
type Inner = SpectrumData<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> SpectrumData<'a> {
pub const VT_MZ: flatbuffers::VOffsetT = 4;
pub const VT_INTENSITY: flatbuffers::VOffsetT = 6;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
SpectrumData { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
args: &'args SpectrumDataArgs<'args>
) -> flatbuffers::WIPOffset<SpectrumData<'bldr>> {
let mut builder = SpectrumDataBuilder::new(_fbb);
if let Some(x) = args.intensity { builder.add_intensity(x); }
if let Some(x) = args.mz { builder.add_mz(x); }
builder.finish()
}
#[inline]
pub fn mz(&self) -> Option<flatbuffers::Vector<'a, f64>> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, f64>>>(SpectrumData::VT_MZ, None)}
}
#[inline]
pub fn intensity(&self) -> Option<flatbuffers::Vector<'a, f32>> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, f32>>>(SpectrumData::VT_INTENSITY, None)}
}
}
impl flatbuffers::Verifiable for SpectrumData<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, f64>>>("mz", Self::VT_MZ, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, f32>>>("intensity", Self::VT_INTENSITY, false)?
.finish();
Ok(())
}
}
pub struct SpectrumDataArgs<'a> {
pub mz: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, f64>>>,
pub intensity: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, f32>>>,
}
impl<'a> Default for SpectrumDataArgs<'a> {
#[inline]
fn default() -> Self {
SpectrumDataArgs {
mz: None,
intensity: None,
}
}
}
pub struct SpectrumDataBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SpectrumDataBuilder<'a, 'b, A> {
#[inline]
pub fn add_mz(&mut self, mz: flatbuffers::WIPOffset<flatbuffers::Vector<'b , f64>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(SpectrumData::VT_MZ, mz);
}
#[inline]
pub fn add_intensity(&mut self, intensity: flatbuffers::WIPOffset<flatbuffers::Vector<'b , f32>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(SpectrumData::VT_INTENSITY, intensity);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> SpectrumDataBuilder<'a, 'b, A> {
let start = _fbb.start_table();
SpectrumDataBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<SpectrumData<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for SpectrumData<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("SpectrumData");
ds.field("mz", &self.mz());
ds.field("intensity", &self.intensity());
ds.finish()
}
}
pub enum StatusLogFloatTOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct StatusLogFloatT<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for StatusLogFloatT<'a> {
type Inner = StatusLogFloatT<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> StatusLogFloatT<'a> {
pub const VT_NAME: flatbuffers::VOffsetT = 4;
pub const VT_TIMES: flatbuffers::VOffsetT = 6;
pub const VT_VALUES: flatbuffers::VOffsetT = 8;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
StatusLogFloatT { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
args: &'args StatusLogFloatTArgs<'args>
) -> flatbuffers::WIPOffset<StatusLogFloatT<'bldr>> {
let mut builder = StatusLogFloatTBuilder::new(_fbb);
if let Some(x) = args.values { builder.add_values(x); }
if let Some(x) = args.times { builder.add_times(x); }
if let Some(x) = args.name { builder.add_name(x); }
builder.finish()
}
#[inline]
pub fn name(&self) -> Option<&'a str> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(StatusLogFloatT::VT_NAME, None)}
}
#[inline]
pub fn times(&self) -> Option<flatbuffers::Vector<'a, f64>> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, f64>>>(StatusLogFloatT::VT_TIMES, None)}
}
#[inline]
pub fn values(&self) -> Option<flatbuffers::Vector<'a, f64>> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, f64>>>(StatusLogFloatT::VT_VALUES, None)}
}
}
impl flatbuffers::Verifiable for StatusLogFloatT<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, f64>>>("times", Self::VT_TIMES, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, f64>>>("values", Self::VT_VALUES, false)?
.finish();
Ok(())
}
}
pub struct StatusLogFloatTArgs<'a> {
pub name: Option<flatbuffers::WIPOffset<&'a str>>,
pub times: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, f64>>>,
pub values: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, f64>>>,
}
impl<'a> Default for StatusLogFloatTArgs<'a> {
#[inline]
fn default() -> Self {
StatusLogFloatTArgs {
name: None,
times: None,
values: None,
}
}
}
pub struct StatusLogFloatTBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> StatusLogFloatTBuilder<'a, 'b, A> {
#[inline]
pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(StatusLogFloatT::VT_NAME, name);
}
#[inline]
pub fn add_times(&mut self, times: flatbuffers::WIPOffset<flatbuffers::Vector<'b , f64>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(StatusLogFloatT::VT_TIMES, times);
}
#[inline]
pub fn add_values(&mut self, values: flatbuffers::WIPOffset<flatbuffers::Vector<'b , f64>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(StatusLogFloatT::VT_VALUES, values);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> StatusLogFloatTBuilder<'a, 'b, A> {
let start = _fbb.start_table();
StatusLogFloatTBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<StatusLogFloatT<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for StatusLogFloatT<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("StatusLogFloatT");
ds.field("name", &self.name());
ds.field("times", &self.times());
ds.field("values", &self.values());
ds.finish()
}
}
pub enum StatusLogBoolTOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct StatusLogBoolT<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for StatusLogBoolT<'a> {
type Inner = StatusLogBoolT<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> StatusLogBoolT<'a> {
pub const VT_NAME: flatbuffers::VOffsetT = 4;
pub const VT_TIMES: flatbuffers::VOffsetT = 6;
pub const VT_VALUES: flatbuffers::VOffsetT = 8;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
StatusLogBoolT { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
args: &'args StatusLogBoolTArgs<'args>
) -> flatbuffers::WIPOffset<StatusLogBoolT<'bldr>> {
let mut builder = StatusLogBoolTBuilder::new(_fbb);
if let Some(x) = args.values { builder.add_values(x); }
if let Some(x) = args.times { builder.add_times(x); }
if let Some(x) = args.name { builder.add_name(x); }
builder.finish()
}
#[inline]
pub fn name(&self) -> Option<&'a str> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(StatusLogBoolT::VT_NAME, None)}
}
#[inline]
pub fn times(&self) -> Option<flatbuffers::Vector<'a, f64>> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, f64>>>(StatusLogBoolT::VT_TIMES, None)}
}
#[inline]
pub fn values(&self) -> Option<flatbuffers::Vector<'a, bool>> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, bool>>>(StatusLogBoolT::VT_VALUES, None)}
}
}
impl flatbuffers::Verifiable for StatusLogBoolT<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, f64>>>("times", Self::VT_TIMES, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, bool>>>("values", Self::VT_VALUES, false)?
.finish();
Ok(())
}
}
pub struct StatusLogBoolTArgs<'a> {
pub name: Option<flatbuffers::WIPOffset<&'a str>>,
pub times: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, f64>>>,
pub values: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, bool>>>,
}
impl<'a> Default for StatusLogBoolTArgs<'a> {
#[inline]
fn default() -> Self {
StatusLogBoolTArgs {
name: None,
times: None,
values: None,
}
}
}
pub struct StatusLogBoolTBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> StatusLogBoolTBuilder<'a, 'b, A> {
#[inline]
pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(StatusLogBoolT::VT_NAME, name);
}
#[inline]
pub fn add_times(&mut self, times: flatbuffers::WIPOffset<flatbuffers::Vector<'b , f64>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(StatusLogBoolT::VT_TIMES, times);
}
#[inline]
pub fn add_values(&mut self, values: flatbuffers::WIPOffset<flatbuffers::Vector<'b , bool>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(StatusLogBoolT::VT_VALUES, values);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> StatusLogBoolTBuilder<'a, 'b, A> {
let start = _fbb.start_table();
StatusLogBoolTBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<StatusLogBoolT<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for StatusLogBoolT<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("StatusLogBoolT");
ds.field("name", &self.name());
ds.field("times", &self.times());
ds.field("values", &self.values());
ds.finish()
}
}
pub enum StatusLogIntTOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct StatusLogIntT<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for StatusLogIntT<'a> {
type Inner = StatusLogIntT<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> StatusLogIntT<'a> {
pub const VT_NAME: flatbuffers::VOffsetT = 4;
pub const VT_TIMES: flatbuffers::VOffsetT = 6;
pub const VT_VALUES: flatbuffers::VOffsetT = 8;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
StatusLogIntT { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
args: &'args StatusLogIntTArgs<'args>
) -> flatbuffers::WIPOffset<StatusLogIntT<'bldr>> {
let mut builder = StatusLogIntTBuilder::new(_fbb);
if let Some(x) = args.values { builder.add_values(x); }
if let Some(x) = args.times { builder.add_times(x); }
if let Some(x) = args.name { builder.add_name(x); }
builder.finish()
}
#[inline]
pub fn name(&self) -> Option<&'a str> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(StatusLogIntT::VT_NAME, None)}
}
#[inline]
pub fn times(&self) -> Option<flatbuffers::Vector<'a, f64>> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, f64>>>(StatusLogIntT::VT_TIMES, None)}
}
#[inline]
pub fn values(&self) -> Option<flatbuffers::Vector<'a, i64>> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, i64>>>(StatusLogIntT::VT_VALUES, None)}
}
}
impl flatbuffers::Verifiable for StatusLogIntT<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, f64>>>("times", Self::VT_TIMES, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, i64>>>("values", Self::VT_VALUES, false)?
.finish();
Ok(())
}
}
pub struct StatusLogIntTArgs<'a> {
pub name: Option<flatbuffers::WIPOffset<&'a str>>,
pub times: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, f64>>>,
pub values: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, i64>>>,
}
impl<'a> Default for StatusLogIntTArgs<'a> {
#[inline]
fn default() -> Self {
StatusLogIntTArgs {
name: None,
times: None,
values: None,
}
}
}
pub struct StatusLogIntTBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> StatusLogIntTBuilder<'a, 'b, A> {
#[inline]
pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(StatusLogIntT::VT_NAME, name);
}
#[inline]
pub fn add_times(&mut self, times: flatbuffers::WIPOffset<flatbuffers::Vector<'b , f64>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(StatusLogIntT::VT_TIMES, times);
}
#[inline]
pub fn add_values(&mut self, values: flatbuffers::WIPOffset<flatbuffers::Vector<'b , i64>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(StatusLogIntT::VT_VALUES, values);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> StatusLogIntTBuilder<'a, 'b, A> {
let start = _fbb.start_table();
StatusLogIntTBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<StatusLogIntT<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for StatusLogIntT<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("StatusLogIntT");
ds.field("name", &self.name());
ds.field("times", &self.times());
ds.field("values", &self.values());
ds.finish()
}
}
pub enum StatusLogStringTOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct StatusLogStringT<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for StatusLogStringT<'a> {
type Inner = StatusLogStringT<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> StatusLogStringT<'a> {
pub const VT_NAME: flatbuffers::VOffsetT = 4;
pub const VT_TIMES: flatbuffers::VOffsetT = 6;
pub const VT_VALUES: flatbuffers::VOffsetT = 8;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
StatusLogStringT { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
args: &'args StatusLogStringTArgs<'args>
) -> flatbuffers::WIPOffset<StatusLogStringT<'bldr>> {
let mut builder = StatusLogStringTBuilder::new(_fbb);
if let Some(x) = args.values { builder.add_values(x); }
if let Some(x) = args.times { builder.add_times(x); }
if let Some(x) = args.name { builder.add_name(x); }
builder.finish()
}
#[inline]
pub fn name(&self) -> Option<&'a str> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(StatusLogStringT::VT_NAME, None)}
}
#[inline]
pub fn times(&self) -> Option<flatbuffers::Vector<'a, f64>> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, f64>>>(StatusLogStringT::VT_TIMES, None)}
}
#[inline]
pub fn values(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>(StatusLogStringT::VT_VALUES, None)}
}
}
impl flatbuffers::Verifiable for StatusLogStringT<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, f64>>>("times", Self::VT_TIMES, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>>>("values", Self::VT_VALUES, false)?
.finish();
Ok(())
}
}
pub struct StatusLogStringTArgs<'a> {
pub name: Option<flatbuffers::WIPOffset<&'a str>>,
pub times: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, f64>>>,
pub values: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>,
}
impl<'a> Default for StatusLogStringTArgs<'a> {
#[inline]
fn default() -> Self {
StatusLogStringTArgs {
name: None,
times: None,
values: None,
}
}
}
pub struct StatusLogStringTBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> StatusLogStringTBuilder<'a, 'b, A> {
#[inline]
pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(StatusLogStringT::VT_NAME, name);
}
#[inline]
pub fn add_times(&mut self, times: flatbuffers::WIPOffset<flatbuffers::Vector<'b , f64>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(StatusLogStringT::VT_TIMES, times);
}
#[inline]
pub fn add_values(&mut self, values: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<&'b str>>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(StatusLogStringT::VT_VALUES, values);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> StatusLogStringTBuilder<'a, 'b, A> {
let start = _fbb.start_table();
StatusLogStringTBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<StatusLogStringT<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for StatusLogStringT<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("StatusLogStringT");
ds.field("name", &self.name());
ds.field("times", &self.times());
ds.field("values", &self.values());
ds.finish()
}
}
pub enum StatusLogCollectionTOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct StatusLogCollectionT<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for StatusLogCollectionT<'a> {
type Inner = StatusLogCollectionT<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> StatusLogCollectionT<'a> {
pub const VT_FLOAT_LOGS: flatbuffers::VOffsetT = 4;
pub const VT_BOOL_LOGS: flatbuffers::VOffsetT = 6;
pub const VT_INT_LOGS: flatbuffers::VOffsetT = 8;
pub const VT_STRING_LOGS: flatbuffers::VOffsetT = 10;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
StatusLogCollectionT { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
args: &'args StatusLogCollectionTArgs<'args>
) -> flatbuffers::WIPOffset<StatusLogCollectionT<'bldr>> {
let mut builder = StatusLogCollectionTBuilder::new(_fbb);
if let Some(x) = args.string_logs { builder.add_string_logs(x); }
if let Some(x) = args.int_logs { builder.add_int_logs(x); }
if let Some(x) = args.bool_logs { builder.add_bool_logs(x); }
if let Some(x) = args.float_logs { builder.add_float_logs(x); }
builder.finish()
}
#[inline]
pub fn float_logs(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<StatusLogFloatT<'a>>>> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<StatusLogFloatT>>>>(StatusLogCollectionT::VT_FLOAT_LOGS, None)}
}
#[inline]
pub fn bool_logs(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<StatusLogBoolT<'a>>>> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<StatusLogBoolT>>>>(StatusLogCollectionT::VT_BOOL_LOGS, None)}
}
#[inline]
pub fn int_logs(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<StatusLogIntT<'a>>>> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<StatusLogIntT>>>>(StatusLogCollectionT::VT_INT_LOGS, None)}
}
#[inline]
pub fn string_logs(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<StatusLogStringT<'a>>>> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<StatusLogStringT>>>>(StatusLogCollectionT::VT_STRING_LOGS, None)}
}
}
impl flatbuffers::Verifiable for StatusLogCollectionT<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<StatusLogFloatT>>>>("float_logs", Self::VT_FLOAT_LOGS, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<StatusLogBoolT>>>>("bool_logs", Self::VT_BOOL_LOGS, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<StatusLogIntT>>>>("int_logs", Self::VT_INT_LOGS, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<StatusLogStringT>>>>("string_logs", Self::VT_STRING_LOGS, false)?
.finish();
Ok(())
}
}
pub struct StatusLogCollectionTArgs<'a> {
pub float_logs: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<StatusLogFloatT<'a>>>>>,
pub bool_logs: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<StatusLogBoolT<'a>>>>>,
pub int_logs: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<StatusLogIntT<'a>>>>>,
pub string_logs: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<StatusLogStringT<'a>>>>>,
}
impl<'a> Default for StatusLogCollectionTArgs<'a> {
#[inline]
fn default() -> Self {
StatusLogCollectionTArgs {
float_logs: None,
bool_logs: None,
int_logs: None,
string_logs: None,
}
}
}
pub struct StatusLogCollectionTBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> StatusLogCollectionTBuilder<'a, 'b, A> {
#[inline]
pub fn add_float_logs(&mut self, float_logs: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<StatusLogFloatT<'b >>>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(StatusLogCollectionT::VT_FLOAT_LOGS, float_logs);
}
#[inline]
pub fn add_bool_logs(&mut self, bool_logs: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<StatusLogBoolT<'b >>>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(StatusLogCollectionT::VT_BOOL_LOGS, bool_logs);
}
#[inline]
pub fn add_int_logs(&mut self, int_logs: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<StatusLogIntT<'b >>>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(StatusLogCollectionT::VT_INT_LOGS, int_logs);
}
#[inline]
pub fn add_string_logs(&mut self, string_logs: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<StatusLogStringT<'b >>>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(StatusLogCollectionT::VT_STRING_LOGS, string_logs);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> StatusLogCollectionTBuilder<'a, 'b, A> {
let start = _fbb.start_table();
StatusLogCollectionTBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<StatusLogCollectionT<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for StatusLogCollectionT<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("StatusLogCollectionT");
ds.field("float_logs", &self.float_logs());
ds.field("bool_logs", &self.bool_logs());
ds.field("int_logs", &self.int_logs());
ds.field("string_logs", &self.string_logs());
ds.finish()
}
}
pub enum ExtendedSpectrumDataTOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct ExtendedSpectrumDataT<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for ExtendedSpectrumDataT<'a> {
type Inner = ExtendedSpectrumDataT<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> ExtendedSpectrumDataT<'a> {
pub const VT_MASS: flatbuffers::VOffsetT = 4;
pub const VT_NOISE: flatbuffers::VOffsetT = 6;
pub const VT_BASELINE: flatbuffers::VOffsetT = 8;
pub const VT_CHARGE: flatbuffers::VOffsetT = 10;
pub const VT_RESOLUTION: flatbuffers::VOffsetT = 12;
pub const VT_SAMPLED_NOISE: flatbuffers::VOffsetT = 14;
pub const VT_SAMPLED_NOISE_BASELINE: flatbuffers::VOffsetT = 16;
pub const VT_SAMPLED_NOISE_MZ: flatbuffers::VOffsetT = 18;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
ExtendedSpectrumDataT { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
args: &'args ExtendedSpectrumDataTArgs<'args>
) -> flatbuffers::WIPOffset<ExtendedSpectrumDataT<'bldr>> {
let mut builder = ExtendedSpectrumDataTBuilder::new(_fbb);
if let Some(x) = args.sampled_noise_mz { builder.add_sampled_noise_mz(x); }
if let Some(x) = args.sampled_noise_baseline { builder.add_sampled_noise_baseline(x); }
if let Some(x) = args.sampled_noise { builder.add_sampled_noise(x); }
if let Some(x) = args.resolution { builder.add_resolution(x); }
if let Some(x) = args.charge { builder.add_charge(x); }
if let Some(x) = args.baseline { builder.add_baseline(x); }
if let Some(x) = args.noise { builder.add_noise(x); }
if let Some(x) = args.mass { builder.add_mass(x); }
builder.finish()
}
#[inline]
pub fn mass(&self) -> Option<flatbuffers::Vector<'a, f64>> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, f64>>>(ExtendedSpectrumDataT::VT_MASS, None)}
}
#[inline]
pub fn noise(&self) -> Option<flatbuffers::Vector<'a, f32>> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, f32>>>(ExtendedSpectrumDataT::VT_NOISE, None)}
}
#[inline]
pub fn baseline(&self) -> Option<flatbuffers::Vector<'a, f32>> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, f32>>>(ExtendedSpectrumDataT::VT_BASELINE, None)}
}
#[inline]
pub fn charge(&self) -> Option<flatbuffers::Vector<'a, f32>> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, f32>>>(ExtendedSpectrumDataT::VT_CHARGE, None)}
}
#[inline]
pub fn resolution(&self) -> Option<flatbuffers::Vector<'a, f32>> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, f32>>>(ExtendedSpectrumDataT::VT_RESOLUTION, None)}
}
#[inline]
pub fn sampled_noise(&self) -> Option<flatbuffers::Vector<'a, f32>> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, f32>>>(ExtendedSpectrumDataT::VT_SAMPLED_NOISE, None)}
}
#[inline]
pub fn sampled_noise_baseline(&self) -> Option<flatbuffers::Vector<'a, f32>> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, f32>>>(ExtendedSpectrumDataT::VT_SAMPLED_NOISE_BASELINE, None)}
}
#[inline]
pub fn sampled_noise_mz(&self) -> Option<flatbuffers::Vector<'a, f32>> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, f32>>>(ExtendedSpectrumDataT::VT_SAMPLED_NOISE_MZ, None)}
}
}
impl flatbuffers::Verifiable for ExtendedSpectrumDataT<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, f64>>>("mass", Self::VT_MASS, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, f32>>>("noise", Self::VT_NOISE, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, f32>>>("baseline", Self::VT_BASELINE, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, f32>>>("charge", Self::VT_CHARGE, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, f32>>>("resolution", Self::VT_RESOLUTION, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, f32>>>("sampled_noise", Self::VT_SAMPLED_NOISE, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, f32>>>("sampled_noise_baseline", Self::VT_SAMPLED_NOISE_BASELINE, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, f32>>>("sampled_noise_mz", Self::VT_SAMPLED_NOISE_MZ, false)?
.finish();
Ok(())
}
}
pub struct ExtendedSpectrumDataTArgs<'a> {
pub mass: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, f64>>>,
pub noise: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, f32>>>,
pub baseline: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, f32>>>,
pub charge: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, f32>>>,
pub resolution: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, f32>>>,
pub sampled_noise: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, f32>>>,
pub sampled_noise_baseline: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, f32>>>,
pub sampled_noise_mz: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, f32>>>,
}
impl<'a> Default for ExtendedSpectrumDataTArgs<'a> {
#[inline]
fn default() -> Self {
ExtendedSpectrumDataTArgs {
mass: None,
noise: None,
baseline: None,
charge: None,
resolution: None,
sampled_noise: None,
sampled_noise_baseline: None,
sampled_noise_mz: None,
}
}
}
pub struct ExtendedSpectrumDataTBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ExtendedSpectrumDataTBuilder<'a, 'b, A> {
#[inline]
pub fn add_mass(&mut self, mass: flatbuffers::WIPOffset<flatbuffers::Vector<'b , f64>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ExtendedSpectrumDataT::VT_MASS, mass);
}
#[inline]
pub fn add_noise(&mut self, noise: flatbuffers::WIPOffset<flatbuffers::Vector<'b , f32>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ExtendedSpectrumDataT::VT_NOISE, noise);
}
#[inline]
pub fn add_baseline(&mut self, baseline: flatbuffers::WIPOffset<flatbuffers::Vector<'b , f32>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ExtendedSpectrumDataT::VT_BASELINE, baseline);
}
#[inline]
pub fn add_charge(&mut self, charge: flatbuffers::WIPOffset<flatbuffers::Vector<'b , f32>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ExtendedSpectrumDataT::VT_CHARGE, charge);
}
#[inline]
pub fn add_resolution(&mut self, resolution: flatbuffers::WIPOffset<flatbuffers::Vector<'b , f32>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ExtendedSpectrumDataT::VT_RESOLUTION, resolution);
}
#[inline]
pub fn add_sampled_noise(&mut self, sampled_noise: flatbuffers::WIPOffset<flatbuffers::Vector<'b , f32>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ExtendedSpectrumDataT::VT_SAMPLED_NOISE, sampled_noise);
}
#[inline]
pub fn add_sampled_noise_baseline(&mut self, sampled_noise_baseline: flatbuffers::WIPOffset<flatbuffers::Vector<'b , f32>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ExtendedSpectrumDataT::VT_SAMPLED_NOISE_BASELINE, sampled_noise_baseline);
}
#[inline]
pub fn add_sampled_noise_mz(&mut self, sampled_noise_mz: flatbuffers::WIPOffset<flatbuffers::Vector<'b , f32>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ExtendedSpectrumDataT::VT_SAMPLED_NOISE_MZ, sampled_noise_mz);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ExtendedSpectrumDataTBuilder<'a, 'b, A> {
let start = _fbb.start_table();
ExtendedSpectrumDataTBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<ExtendedSpectrumDataT<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for ExtendedSpectrumDataT<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("ExtendedSpectrumDataT");
ds.field("mass", &self.mass());
ds.field("noise", &self.noise());
ds.field("baseline", &self.baseline());
ds.field("charge", &self.charge());
ds.field("resolution", &self.resolution());
ds.field("sampled_noise", &self.sampled_noise());
ds.field("sampled_noise_baseline", &self.sampled_noise_baseline());
ds.field("sampled_noise_mz", &self.sampled_noise_mz());
ds.finish()
}
}
pub enum TrailerValueTOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct TrailerValueT<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for TrailerValueT<'a> {
type Inner = TrailerValueT<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> TrailerValueT<'a> {
pub const VT_LABEL: flatbuffers::VOffsetT = 4;
pub const VT_VALUE: flatbuffers::VOffsetT = 6;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
TrailerValueT { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
args: &'args TrailerValueTArgs<'args>
) -> flatbuffers::WIPOffset<TrailerValueT<'bldr>> {
let mut builder = TrailerValueTBuilder::new(_fbb);
if let Some(x) = args.value { builder.add_value(x); }
if let Some(x) = args.label { builder.add_label(x); }
builder.finish()
}
#[inline]
pub fn label(&self) -> Option<&'a str> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(TrailerValueT::VT_LABEL, None)}
}
#[inline]
pub fn value(&self) -> Option<&'a str> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(TrailerValueT::VT_VALUE, None)}
}
}
impl flatbuffers::Verifiable for TrailerValueT<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("label", Self::VT_LABEL, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("value", Self::VT_VALUE, false)?
.finish();
Ok(())
}
}
pub struct TrailerValueTArgs<'a> {
pub label: Option<flatbuffers::WIPOffset<&'a str>>,
pub value: Option<flatbuffers::WIPOffset<&'a str>>,
}
impl<'a> Default for TrailerValueTArgs<'a> {
#[inline]
fn default() -> Self {
TrailerValueTArgs {
label: None,
value: None,
}
}
}
pub struct TrailerValueTBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TrailerValueTBuilder<'a, 'b, A> {
#[inline]
pub fn add_label(&mut self, label: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(TrailerValueT::VT_LABEL, label);
}
#[inline]
pub fn add_value(&mut self, value: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(TrailerValueT::VT_VALUE, value);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TrailerValueTBuilder<'a, 'b, A> {
let start = _fbb.start_table();
TrailerValueTBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<TrailerValueT<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for TrailerValueT<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("TrailerValueT");
ds.field("label", &self.label());
ds.field("value", &self.value());
ds.finish()
}
}
pub enum TrailerValuesTOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct TrailerValuesT<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for TrailerValuesT<'a> {
type Inner = TrailerValuesT<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> TrailerValuesT<'a> {
pub const VT_TRAILERS: flatbuffers::VOffsetT = 4;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
TrailerValuesT { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
args: &'args TrailerValuesTArgs<'args>
) -> flatbuffers::WIPOffset<TrailerValuesT<'bldr>> {
let mut builder = TrailerValuesTBuilder::new(_fbb);
if let Some(x) = args.trailers { builder.add_trailers(x); }
builder.finish()
}
#[inline]
pub fn trailers(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<TrailerValueT<'a>>>> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<TrailerValueT>>>>(TrailerValuesT::VT_TRAILERS, None)}
}
}
impl flatbuffers::Verifiable for TrailerValuesT<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<TrailerValueT>>>>("trailers", Self::VT_TRAILERS, false)?
.finish();
Ok(())
}
}
pub struct TrailerValuesTArgs<'a> {
pub trailers: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<TrailerValueT<'a>>>>>,
}
impl<'a> Default for TrailerValuesTArgs<'a> {
#[inline]
fn default() -> Self {
TrailerValuesTArgs {
trailers: None,
}
}
}
pub struct TrailerValuesTBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TrailerValuesTBuilder<'a, 'b, A> {
#[inline]
pub fn add_trailers(&mut self, trailers: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<TrailerValueT<'b >>>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(TrailerValuesT::VT_TRAILERS, trailers);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TrailerValuesTBuilder<'a, 'b, A> {
let start = _fbb.start_table();
TrailerValuesTBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<TrailerValuesT<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for TrailerValuesT<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("TrailerValuesT");
ds.field("trailers", &self.trailers());
ds.finish()
}
}
pub enum InstrumentMethodTOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct InstrumentMethodT<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for InstrumentMethodT<'a> {
type Inner = InstrumentMethodT<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> InstrumentMethodT<'a> {
pub const VT_INDEX: flatbuffers::VOffsetT = 4;
pub const VT_TEXT: flatbuffers::VOffsetT = 6;
pub const VT_DISPLAY_NAME: flatbuffers::VOffsetT = 8;
pub const VT_NAME: flatbuffers::VOffsetT = 10;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
InstrumentMethodT { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
args: &'args InstrumentMethodTArgs<'args>
) -> flatbuffers::WIPOffset<InstrumentMethodT<'bldr>> {
let mut builder = InstrumentMethodTBuilder::new(_fbb);
if let Some(x) = args.name { builder.add_name(x); }
if let Some(x) = args.display_name { builder.add_display_name(x); }
if let Some(x) = args.text { builder.add_text(x); }
builder.add_index(args.index);
builder.finish()
}
#[inline]
pub fn index(&self) -> u8 {
unsafe { self._tab.get::<u8>(InstrumentMethodT::VT_INDEX, Some(0)).unwrap()}
}
#[inline]
pub fn text(&self) -> Option<&'a str> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(InstrumentMethodT::VT_TEXT, None)}
}
#[inline]
pub fn display_name(&self) -> Option<&'a str> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(InstrumentMethodT::VT_DISPLAY_NAME, None)}
}
#[inline]
pub fn name(&self) -> Option<&'a str> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(InstrumentMethodT::VT_NAME, None)}
}
}
impl flatbuffers::Verifiable for InstrumentMethodT<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<u8>("index", Self::VT_INDEX, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("text", Self::VT_TEXT, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("display_name", Self::VT_DISPLAY_NAME, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
.finish();
Ok(())
}
}
pub struct InstrumentMethodTArgs<'a> {
pub index: u8,
pub text: Option<flatbuffers::WIPOffset<&'a str>>,
pub display_name: Option<flatbuffers::WIPOffset<&'a str>>,
pub name: Option<flatbuffers::WIPOffset<&'a str>>,
}
impl<'a> Default for InstrumentMethodTArgs<'a> {
#[inline]
fn default() -> Self {
InstrumentMethodTArgs {
index: 0,
text: None,
display_name: None,
name: None,
}
}
}
pub struct InstrumentMethodTBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> InstrumentMethodTBuilder<'a, 'b, A> {
#[inline]
pub fn add_index(&mut self, index: u8) {
self.fbb_.push_slot::<u8>(InstrumentMethodT::VT_INDEX, index, 0);
}
#[inline]
pub fn add_text(&mut self, text: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(InstrumentMethodT::VT_TEXT, text);
}
#[inline]
pub fn add_display_name(&mut self, display_name: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(InstrumentMethodT::VT_DISPLAY_NAME, display_name);
}
#[inline]
pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(InstrumentMethodT::VT_NAME, name);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> InstrumentMethodTBuilder<'a, 'b, A> {
let start = _fbb.start_table();
InstrumentMethodTBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<InstrumentMethodT<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for InstrumentMethodT<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("InstrumentMethodT");
ds.field("index", &self.index());
ds.field("text", &self.text());
ds.field("display_name", &self.display_name());
ds.field("name", &self.name());
ds.finish()
}
}
pub enum AcquisitionTOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct AcquisitionT<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for AcquisitionT<'a> {
type Inner = AcquisitionT<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> AcquisitionT<'a> {
pub const VT_LOW_MZ: flatbuffers::VOffsetT = 4;
pub const VT_HIGH_MZ: flatbuffers::VOffsetT = 6;
pub const VT_INJECTION_TIME: flatbuffers::VOffsetT = 8;
pub const VT_COMPENSATION_VOLTAGES: flatbuffers::VOffsetT = 10;
pub const VT_MASS_ANALYZER: flatbuffers::VOffsetT = 12;
pub const VT_SCAN_EVENT: flatbuffers::VOffsetT = 14;
pub const VT_IONIZATION_MODE: flatbuffers::VOffsetT = 16;
pub const VT_RESOLUTION: flatbuffers::VOffsetT = 18;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
AcquisitionT { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
args: &'args AcquisitionTArgs<'args>
) -> flatbuffers::WIPOffset<AcquisitionT<'bldr>> {
let mut builder = AcquisitionTBuilder::new(_fbb);
builder.add_high_mz(args.high_mz);
builder.add_low_mz(args.low_mz);
if let Some(x) = args.resolution { builder.add_resolution(x); }
builder.add_scan_event(args.scan_event);
if let Some(x) = args.compensation_voltages { builder.add_compensation_voltages(x); }
builder.add_injection_time(args.injection_time);
builder.add_ionization_mode(args.ionization_mode);
builder.add_mass_analyzer(args.mass_analyzer);
builder.finish()
}
#[inline]
pub fn low_mz(&self) -> f64 {
unsafe { self._tab.get::<f64>(AcquisitionT::VT_LOW_MZ, Some(0.0)).unwrap()}
}
#[inline]
pub fn high_mz(&self) -> f64 {
unsafe { self._tab.get::<f64>(AcquisitionT::VT_HIGH_MZ, Some(0.0)).unwrap()}
}
#[inline]
pub fn injection_time(&self) -> f32 {
unsafe { self._tab.get::<f32>(AcquisitionT::VT_INJECTION_TIME, Some(0.0)).unwrap()}
}
#[inline]
pub fn compensation_voltages(&self) -> Option<flatbuffers::Vector<'a, f32>> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, f32>>>(AcquisitionT::VT_COMPENSATION_VOLTAGES, None)}
}
#[inline]
pub fn mass_analyzer(&self) -> MassAnalyzer {
unsafe { self._tab.get::<MassAnalyzer>(AcquisitionT::VT_MASS_ANALYZER, Some(MassAnalyzer::FTMS)).unwrap()}
}
#[inline]
pub fn scan_event(&self) -> i32 {
unsafe { self._tab.get::<i32>(AcquisitionT::VT_SCAN_EVENT, Some(1)).unwrap()}
}
#[inline]
pub fn ionization_mode(&self) -> IonizationMode {
unsafe { self._tab.get::<IonizationMode>(AcquisitionT::VT_IONIZATION_MODE, Some(IonizationMode::NanoSpray)).unwrap()}
}
#[inline]
pub fn resolution(&self) -> Option<f32> {
unsafe { self._tab.get::<f32>(AcquisitionT::VT_RESOLUTION, None)}
}
}
impl flatbuffers::Verifiable for AcquisitionT<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<f64>("low_mz", Self::VT_LOW_MZ, false)?
.visit_field::<f64>("high_mz", Self::VT_HIGH_MZ, false)?
.visit_field::<f32>("injection_time", Self::VT_INJECTION_TIME, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, f32>>>("compensation_voltages", Self::VT_COMPENSATION_VOLTAGES, false)?
.visit_field::<MassAnalyzer>("mass_analyzer", Self::VT_MASS_ANALYZER, false)?
.visit_field::<i32>("scan_event", Self::VT_SCAN_EVENT, false)?
.visit_field::<IonizationMode>("ionization_mode", Self::VT_IONIZATION_MODE, false)?
.visit_field::<f32>("resolution", Self::VT_RESOLUTION, false)?
.finish();
Ok(())
}
}
pub struct AcquisitionTArgs<'a> {
pub low_mz: f64,
pub high_mz: f64,
pub injection_time: f32,
pub compensation_voltages: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, f32>>>,
pub mass_analyzer: MassAnalyzer,
pub scan_event: i32,
pub ionization_mode: IonizationMode,
pub resolution: Option<f32>,
}
impl<'a> Default for AcquisitionTArgs<'a> {
#[inline]
fn default() -> Self {
AcquisitionTArgs {
low_mz: 0.0,
high_mz: 0.0,
injection_time: 0.0,
compensation_voltages: None,
mass_analyzer: MassAnalyzer::FTMS,
scan_event: 1,
ionization_mode: IonizationMode::NanoSpray,
resolution: None,
}
}
}
pub struct AcquisitionTBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> AcquisitionTBuilder<'a, 'b, A> {
#[inline]
pub fn add_low_mz(&mut self, low_mz: f64) {
self.fbb_.push_slot::<f64>(AcquisitionT::VT_LOW_MZ, low_mz, 0.0);
}
#[inline]
pub fn add_high_mz(&mut self, high_mz: f64) {
self.fbb_.push_slot::<f64>(AcquisitionT::VT_HIGH_MZ, high_mz, 0.0);
}
#[inline]
pub fn add_injection_time(&mut self, injection_time: f32) {
self.fbb_.push_slot::<f32>(AcquisitionT::VT_INJECTION_TIME, injection_time, 0.0);
}
#[inline]
pub fn add_compensation_voltages(&mut self, compensation_voltages: flatbuffers::WIPOffset<flatbuffers::Vector<'b , f32>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(AcquisitionT::VT_COMPENSATION_VOLTAGES, compensation_voltages);
}
#[inline]
pub fn add_mass_analyzer(&mut self, mass_analyzer: MassAnalyzer) {
self.fbb_.push_slot::<MassAnalyzer>(AcquisitionT::VT_MASS_ANALYZER, mass_analyzer, MassAnalyzer::FTMS);
}
#[inline]
pub fn add_scan_event(&mut self, scan_event: i32) {
self.fbb_.push_slot::<i32>(AcquisitionT::VT_SCAN_EVENT, scan_event, 1);
}
#[inline]
pub fn add_ionization_mode(&mut self, ionization_mode: IonizationMode) {
self.fbb_.push_slot::<IonizationMode>(AcquisitionT::VT_IONIZATION_MODE, ionization_mode, IonizationMode::NanoSpray);
}
#[inline]
pub fn add_resolution(&mut self, resolution: f32) {
self.fbb_.push_slot_always::<f32>(AcquisitionT::VT_RESOLUTION, resolution);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> AcquisitionTBuilder<'a, 'b, A> {
let start = _fbb.start_table();
AcquisitionTBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<AcquisitionT<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for AcquisitionT<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("AcquisitionT");
ds.field("low_mz", &self.low_mz());
ds.field("high_mz", &self.high_mz());
ds.field("injection_time", &self.injection_time());
ds.field("compensation_voltages", &self.compensation_voltages());
ds.field("mass_analyzer", &self.mass_analyzer());
ds.field("scan_event", &self.scan_event());
ds.field("ionization_mode", &self.ionization_mode());
ds.field("resolution", &self.resolution());
ds.finish()
}
}
pub enum SpectrumDescriptionOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct SpectrumDescription<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for SpectrumDescription<'a> {
type Inner = SpectrumDescription<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> SpectrumDescription<'a> {
pub const VT_INDEX: flatbuffers::VOffsetT = 4;
pub const VT_MS_LEVEL: flatbuffers::VOffsetT = 6;
pub const VT_TIME: flatbuffers::VOffsetT = 8;
pub const VT_POLARITY: flatbuffers::VOffsetT = 10;
pub const VT_MODE: flatbuffers::VOffsetT = 12;
pub const VT_PRECURSOR: flatbuffers::VOffsetT = 14;
pub const VT_DATA: flatbuffers::VOffsetT = 16;
pub const VT_FILTER_STRING: flatbuffers::VOffsetT = 18;
pub const VT_ACQUISITION: flatbuffers::VOffsetT = 20;
pub const VT_MS_ORDER: flatbuffers::VOffsetT = 22;
pub const VT_SCAN_MODE: flatbuffers::VOffsetT = 24;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
SpectrumDescription { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
args: &'args SpectrumDescriptionArgs<'args>
) -> flatbuffers::WIPOffset<SpectrumDescription<'bldr>> {
let mut builder = SpectrumDescriptionBuilder::new(_fbb);
builder.add_time(args.time);
if let Some(x) = args.acquisition { builder.add_acquisition(x); }
if let Some(x) = args.filter_string { builder.add_filter_string(x); }
if let Some(x) = args.data { builder.add_data(x); }
if let Some(x) = args.precursor { builder.add_precursor(x); }
builder.add_index(args.index);
builder.add_ms_order(args.ms_order);
builder.add_scan_mode(args.scan_mode);
builder.add_mode(args.mode);
builder.add_polarity(args.polarity);
builder.add_ms_level(args.ms_level);
builder.finish()
}
#[inline]
pub fn index(&self) -> i32 {
unsafe { self._tab.get::<i32>(SpectrumDescription::VT_INDEX, Some(0)).unwrap()}
}
#[inline]
pub fn ms_level(&self) -> u8 {
unsafe { self._tab.get::<u8>(SpectrumDescription::VT_MS_LEVEL, Some(2)).unwrap()}
}
#[inline]
pub fn time(&self) -> f64 {
unsafe { self._tab.get::<f64>(SpectrumDescription::VT_TIME, Some(0.0)).unwrap()}
}
#[inline]
pub fn polarity(&self) -> Polarity {
unsafe { self._tab.get::<Polarity>(SpectrumDescription::VT_POLARITY, Some(Polarity::Positive)).unwrap()}
}
#[inline]
pub fn mode(&self) -> SpectrumMode {
unsafe { self._tab.get::<SpectrumMode>(SpectrumDescription::VT_MODE, Some(SpectrumMode::Profile)).unwrap()}
}
#[inline]
pub fn precursor(&self) -> Option<&'a PrecursorT> {
unsafe { self._tab.get::<PrecursorT>(SpectrumDescription::VT_PRECURSOR, None)}
}
#[inline]
pub fn data(&self) -> Option<SpectrumData<'a>> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<SpectrumData>>(SpectrumDescription::VT_DATA, None)}
}
#[inline]
pub fn filter_string(&self) -> Option<&'a str> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(SpectrumDescription::VT_FILTER_STRING, None)}
}
#[inline]
pub fn acquisition(&self) -> Option<AcquisitionT<'a>> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<AcquisitionT>>(SpectrumDescription::VT_ACQUISITION, None)}
}
#[inline]
pub fn ms_order(&self) -> MSOrder {
unsafe { self._tab.get::<MSOrder>(SpectrumDescription::VT_MS_ORDER, Some(MSOrder::Unknown)).unwrap()}
}
#[inline]
pub fn scan_mode(&self) -> ScanMode {
unsafe { self._tab.get::<ScanMode>(SpectrumDescription::VT_SCAN_MODE, Some(ScanMode::Full)).unwrap()}
}
}
impl flatbuffers::Verifiable for SpectrumDescription<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<i32>("index", Self::VT_INDEX, false)?
.visit_field::<u8>("ms_level", Self::VT_MS_LEVEL, false)?
.visit_field::<f64>("time", Self::VT_TIME, false)?
.visit_field::<Polarity>("polarity", Self::VT_POLARITY, false)?
.visit_field::<SpectrumMode>("mode", Self::VT_MODE, false)?
.visit_field::<PrecursorT>("precursor", Self::VT_PRECURSOR, false)?
.visit_field::<flatbuffers::ForwardsUOffset<SpectrumData>>("data", Self::VT_DATA, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("filter_string", Self::VT_FILTER_STRING, false)?
.visit_field::<flatbuffers::ForwardsUOffset<AcquisitionT>>("acquisition", Self::VT_ACQUISITION, false)?
.visit_field::<MSOrder>("ms_order", Self::VT_MS_ORDER, false)?
.visit_field::<ScanMode>("scan_mode", Self::VT_SCAN_MODE, false)?
.finish();
Ok(())
}
}
pub struct SpectrumDescriptionArgs<'a> {
pub index: i32,
pub ms_level: u8,
pub time: f64,
pub polarity: Polarity,
pub mode: SpectrumMode,
pub precursor: Option<&'a PrecursorT>,
pub data: Option<flatbuffers::WIPOffset<SpectrumData<'a>>>,
pub filter_string: Option<flatbuffers::WIPOffset<&'a str>>,
pub acquisition: Option<flatbuffers::WIPOffset<AcquisitionT<'a>>>,
pub ms_order: MSOrder,
pub scan_mode: ScanMode,
}
impl<'a> Default for SpectrumDescriptionArgs<'a> {
#[inline]
fn default() -> Self {
SpectrumDescriptionArgs {
index: 0,
ms_level: 2,
time: 0.0,
polarity: Polarity::Positive,
mode: SpectrumMode::Profile,
precursor: None,
data: None,
filter_string: None,
acquisition: None,
ms_order: MSOrder::Unknown,
scan_mode: ScanMode::Full,
}
}
}
pub struct SpectrumDescriptionBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SpectrumDescriptionBuilder<'a, 'b, A> {
#[inline]
pub fn add_index(&mut self, index: i32) {
self.fbb_.push_slot::<i32>(SpectrumDescription::VT_INDEX, index, 0);
}
#[inline]
pub fn add_ms_level(&mut self, ms_level: u8) {
self.fbb_.push_slot::<u8>(SpectrumDescription::VT_MS_LEVEL, ms_level, 2);
}
#[inline]
pub fn add_time(&mut self, time: f64) {
self.fbb_.push_slot::<f64>(SpectrumDescription::VT_TIME, time, 0.0);
}
#[inline]
pub fn add_polarity(&mut self, polarity: Polarity) {
self.fbb_.push_slot::<Polarity>(SpectrumDescription::VT_POLARITY, polarity, Polarity::Positive);
}
#[inline]
pub fn add_mode(&mut self, mode: SpectrumMode) {
self.fbb_.push_slot::<SpectrumMode>(SpectrumDescription::VT_MODE, mode, SpectrumMode::Profile);
}
#[inline]
pub fn add_precursor(&mut self, precursor: &PrecursorT) {
self.fbb_.push_slot_always::<&PrecursorT>(SpectrumDescription::VT_PRECURSOR, precursor);
}
#[inline]
pub fn add_data(&mut self, data: flatbuffers::WIPOffset<SpectrumData<'b >>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<SpectrumData>>(SpectrumDescription::VT_DATA, data);
}
#[inline]
pub fn add_filter_string(&mut self, filter_string: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(SpectrumDescription::VT_FILTER_STRING, filter_string);
}
#[inline]
pub fn add_acquisition(&mut self, acquisition: flatbuffers::WIPOffset<AcquisitionT<'b >>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<AcquisitionT>>(SpectrumDescription::VT_ACQUISITION, acquisition);
}
#[inline]
pub fn add_ms_order(&mut self, ms_order: MSOrder) {
self.fbb_.push_slot::<MSOrder>(SpectrumDescription::VT_MS_ORDER, ms_order, MSOrder::Unknown);
}
#[inline]
pub fn add_scan_mode(&mut self, scan_mode: ScanMode) {
self.fbb_.push_slot::<ScanMode>(SpectrumDescription::VT_SCAN_MODE, scan_mode, ScanMode::Full);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> SpectrumDescriptionBuilder<'a, 'b, A> {
let start = _fbb.start_table();
SpectrumDescriptionBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<SpectrumDescription<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for SpectrumDescription<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("SpectrumDescription");
ds.field("index", &self.index());
ds.field("ms_level", &self.ms_level());
ds.field("time", &self.time());
ds.field("polarity", &self.polarity());
ds.field("mode", &self.mode());
ds.field("precursor", &self.precursor());
ds.field("data", &self.data());
ds.field("filter_string", &self.filter_string());
ds.field("acquisition", &self.acquisition());
ds.field("ms_order", &self.ms_order());
ds.field("scan_mode", &self.scan_mode());
ds.finish()
}
}
pub enum ChromatogramDataOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct ChromatogramData<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for ChromatogramData<'a> {
type Inner = ChromatogramData<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> ChromatogramData<'a> {
pub const VT_TIME: flatbuffers::VOffsetT = 4;
pub const VT_INTENSITY: flatbuffers::VOffsetT = 6;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
ChromatogramData { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
args: &'args ChromatogramDataArgs<'args>
) -> flatbuffers::WIPOffset<ChromatogramData<'bldr>> {
let mut builder = ChromatogramDataBuilder::new(_fbb);
if let Some(x) = args.intensity { builder.add_intensity(x); }
if let Some(x) = args.time { builder.add_time(x); }
builder.finish()
}
#[inline]
pub fn time(&self) -> Option<flatbuffers::Vector<'a, f64>> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, f64>>>(ChromatogramData::VT_TIME, None)}
}
#[inline]
pub fn intensity(&self) -> Option<flatbuffers::Vector<'a, f32>> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, f32>>>(ChromatogramData::VT_INTENSITY, None)}
}
}
impl flatbuffers::Verifiable for ChromatogramData<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, f64>>>("time", Self::VT_TIME, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, f32>>>("intensity", Self::VT_INTENSITY, false)?
.finish();
Ok(())
}
}
pub struct ChromatogramDataArgs<'a> {
pub time: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, f64>>>,
pub intensity: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, f32>>>,
}
impl<'a> Default for ChromatogramDataArgs<'a> {
#[inline]
fn default() -> Self {
ChromatogramDataArgs {
time: None,
intensity: None,
}
}
}
pub struct ChromatogramDataBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ChromatogramDataBuilder<'a, 'b, A> {
#[inline]
pub fn add_time(&mut self, time: flatbuffers::WIPOffset<flatbuffers::Vector<'b , f64>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ChromatogramData::VT_TIME, time);
}
#[inline]
pub fn add_intensity(&mut self, intensity: flatbuffers::WIPOffset<flatbuffers::Vector<'b , f32>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ChromatogramData::VT_INTENSITY, intensity);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ChromatogramDataBuilder<'a, 'b, A> {
let start = _fbb.start_table();
ChromatogramDataBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<ChromatogramData<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for ChromatogramData<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("ChromatogramData");
ds.field("time", &self.time());
ds.field("intensity", &self.intensity());
ds.finish()
}
}
pub enum ChromatogramDescriptionOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct ChromatogramDescription<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for ChromatogramDescription<'a> {
type Inner = ChromatogramDescription<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> ChromatogramDescription<'a> {
pub const VT_TRACE_TYPE: flatbuffers::VOffsetT = 4;
pub const VT_DATA: flatbuffers::VOffsetT = 6;
pub const VT_START_INDEX: flatbuffers::VOffsetT = 8;
pub const VT_END_INDEX: flatbuffers::VOffsetT = 10;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
ChromatogramDescription { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
args: &'args ChromatogramDescriptionArgs<'args>
) -> flatbuffers::WIPOffset<ChromatogramDescription<'bldr>> {
let mut builder = ChromatogramDescriptionBuilder::new(_fbb);
builder.add_end_index(args.end_index);
builder.add_start_index(args.start_index);
if let Some(x) = args.data { builder.add_data(x); }
builder.add_trace_type(args.trace_type);
builder.finish()
}
#[inline]
pub fn trace_type(&self) -> TraceTypeT {
unsafe { self._tab.get::<TraceTypeT>(ChromatogramDescription::VT_TRACE_TYPE, Some(TraceTypeT::MassRange)).unwrap()}
}
#[inline]
pub fn data(&self) -> Option<ChromatogramData<'a>> {
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<ChromatogramData>>(ChromatogramDescription::VT_DATA, None)}
}
#[inline]
pub fn start_index(&self) -> i32 {
unsafe { self._tab.get::<i32>(ChromatogramDescription::VT_START_INDEX, Some(0)).unwrap()}
}
#[inline]
pub fn end_index(&self) -> i32 {
unsafe { self._tab.get::<i32>(ChromatogramDescription::VT_END_INDEX, Some(0)).unwrap()}
}
}
impl flatbuffers::Verifiable for ChromatogramDescription<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<TraceTypeT>("trace_type", Self::VT_TRACE_TYPE, false)?
.visit_field::<flatbuffers::ForwardsUOffset<ChromatogramData>>("data", Self::VT_DATA, false)?
.visit_field::<i32>("start_index", Self::VT_START_INDEX, false)?
.visit_field::<i32>("end_index", Self::VT_END_INDEX, false)?
.finish();
Ok(())
}
}
pub struct ChromatogramDescriptionArgs<'a> {
pub trace_type: TraceTypeT,
pub data: Option<flatbuffers::WIPOffset<ChromatogramData<'a>>>,
pub start_index: i32,
pub end_index: i32,
}
impl<'a> Default for ChromatogramDescriptionArgs<'a> {
#[inline]
fn default() -> Self {
ChromatogramDescriptionArgs {
trace_type: TraceTypeT::MassRange,
data: None,
start_index: 0,
end_index: 0,
}
}
}
pub struct ChromatogramDescriptionBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ChromatogramDescriptionBuilder<'a, 'b, A> {
#[inline]
pub fn add_trace_type(&mut self, trace_type: TraceTypeT) {
self.fbb_.push_slot::<TraceTypeT>(ChromatogramDescription::VT_TRACE_TYPE, trace_type, TraceTypeT::MassRange);
}
#[inline]
pub fn add_data(&mut self, data: flatbuffers::WIPOffset<ChromatogramData<'b >>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<ChromatogramData>>(ChromatogramDescription::VT_DATA, data);
}
#[inline]
pub fn add_start_index(&mut self, start_index: i32) {
self.fbb_.push_slot::<i32>(ChromatogramDescription::VT_START_INDEX, start_index, 0);
}
#[inline]
pub fn add_end_index(&mut self, end_index: i32) {
self.fbb_.push_slot::<i32>(ChromatogramDescription::VT_END_INDEX, end_index, 0);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ChromatogramDescriptionBuilder<'a, 'b, A> {
let start = _fbb.start_table();
ChromatogramDescriptionBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<ChromatogramDescription<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for ChromatogramDescription<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("ChromatogramDescription");
ds.field("trace_type", &self.trace_type());
ds.field("data", &self.data());
ds.field("start_index", &self.start_index());
ds.field("end_index", &self.end_index());
ds.finish()
}
}
#[inline]
pub fn root_as_spectrum_description(buf: &[u8]) -> Result<SpectrumDescription, flatbuffers::InvalidFlatbuffer> {
flatbuffers::root::<SpectrumDescription>(buf)
}
#[inline]
pub fn size_prefixed_root_as_spectrum_description(buf: &[u8]) -> Result<SpectrumDescription, flatbuffers::InvalidFlatbuffer> {
flatbuffers::size_prefixed_root::<SpectrumDescription>(buf)
}
#[inline]
pub fn root_as_spectrum_description_with_opts<'b, 'o>(
opts: &'o flatbuffers::VerifierOptions,
buf: &'b [u8],
) -> Result<SpectrumDescription<'b>, flatbuffers::InvalidFlatbuffer> {
flatbuffers::root_with_opts::<SpectrumDescription<'b>>(opts, buf)
}
#[inline]
pub fn size_prefixed_root_as_spectrum_description_with_opts<'b, 'o>(
opts: &'o flatbuffers::VerifierOptions,
buf: &'b [u8],
) -> Result<SpectrumDescription<'b>, flatbuffers::InvalidFlatbuffer> {
flatbuffers::size_prefixed_root_with_opts::<SpectrumDescription<'b>>(opts, buf)
}
#[inline]
pub unsafe fn root_as_spectrum_description_unchecked(buf: &[u8]) -> SpectrumDescription {
flatbuffers::root_unchecked::<SpectrumDescription>(buf)
}
#[inline]
pub unsafe fn size_prefixed_root_as_spectrum_description_unchecked(buf: &[u8]) -> SpectrumDescription {
flatbuffers::size_prefixed_root_unchecked::<SpectrumDescription>(buf)
}
#[inline]
pub fn finish_spectrum_description_buffer<'a, 'b, A: flatbuffers::Allocator + 'a>(
fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
root: flatbuffers::WIPOffset<SpectrumDescription<'a>>) {
fbb.finish(root, None);
}
#[inline]
pub fn finish_size_prefixed_spectrum_description_buffer<'a, 'b, A: flatbuffers::Allocator + 'a>(fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, root: flatbuffers::WIPOffset<SpectrumDescription<'a>>) {
fbb.finish_size_prefixed(root, None);
}
}