parse_monitors/monitors/
mod.rs

1mod mirror;
2mod reports;
3
4use std::path::PathBuf;
5
6pub use mirror::Mirror;
7pub use reports::{Exertion, Monitors, MonitorsLoader};
8
9#[derive(thiserror::Error, Debug)]
10pub enum MonitorsError {
11    #[error("failed to decompress the monitor file")]
12    #[cfg(feature = "bzip2")]
13    Decompress(#[from] bzip2::Error),
14    #[error("failed to read the monitor file: {1}")]
15    Io(#[source] std::io::Error, PathBuf),
16    #[error("failed to deserialize the CSV file")]
17    Csv(#[from] csv::Error),
18    #[error("failed to parse String")]
19    Parse(#[from] std::num::ParseFloatError),
20    #[error("failed to parse String")]
21    Regex(#[from] regex::Error),
22    #[error("entry {0} not found in Map")]
23    MissingEntry(String),
24    #[error("expected year {0}, found {1}")]
25    YearMismatch(u32, u32),
26    #[cfg(feature = "plot")]
27    #[error("failed to plot forces: {0}")]
28    PlotForces(String),
29}