peck_lib/
error.rs

1use std::fmt;
2
3pub enum Message {
4    Max19DecimalPlaces,
5}
6
7impl fmt::Display for Message {
8    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9        write!(f, "{}", match self {
10            Self::Max19DecimalPlaces => "Warning: This function can only truncate to a maximum of 19 decimal places, truncating to maximum.",
11        })
12    }
13}
14
15pub enum Error {}
16
17pub enum Warning {
18    F64(f64, Message),
19    F32(f32, Message),
20}