anofox_statistics/error.rs
1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum StatError {
5 #[error("empty input data")]
6 EmptyData,
7 #[error("insufficient data: need at least {needed}, got {got}")]
8 InsufficientData { needed: usize, got: usize },
9 #[error("invalid parameter: {0}")]
10 InvalidParameter(String),
11}
12
13pub type Result<T> = std::result::Result<T, StatError>;