stlplus_rs/
error.rs

1#[derive(thiserror::Error, Debug)]
2pub enum Error {
3    #[error("empty input slice given")]
4    EmptyInputSlice,
5
6    #[error("input slice of differing length")]
7    InputSlicesDifferingLength,
8
9    #[error("input slice contains invalid values")]
10    InputSliceInvalidValues,
11
12    #[error("Invalid degree - must be 1, 2 or 3")]
13    InvalidDegree,
14
15    #[error("Invalid window - must be > 0")]
16    InvalidWindow,
17
18    #[error("length of sub_labels must match num_obs_per_period")]
19    InvalidSubLabelsLength,
20
21    #[error("sub_labels must be unique")]
22    SubLabelsMustBeUnique,
23
24    #[error("num_obs_per_period is invalid")]
25    InvalidNumObsPerPeriod,
26    // InvalidNumberOfDataPoints,
27    #[error("unexpected 0 encountered")]
28    UnexpectedZero,
29
30    #[error("input slice contains to few observations - must be more than two periods")]
31    InputSliceToFewObs,
32}