opentfraw 1.0.6

Rust parser for Thermo Fisher RAW mass spectrometry files.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::error::Result;
use crate::reader::BinaryReader;
use std::io::{Read, Seek};

/// An error log entry.
#[derive(Debug)]
pub struct ErrorEntry {
    pub time: f32,
    pub message: String,
}

impl ErrorEntry {
    pub(crate) fn read<R: Read + Seek>(r: &mut BinaryReader<R>) -> Result<Self> {
        let time = r.read_f32()?;
        let message = r.read_pascal_string()?;
        Ok(Self { time, message })
    }
}