dalybms_lib/error.rs
1/// Represents the possible errors that can occur in the `dalybms_lib`.
2#[derive(Debug, thiserror::Error, PartialEq)]
3pub enum Error {
4 /// Error indicating an invalid checksum in the received data.
5 #[error("Invalid checksum")]
6 CheckSumError,
7
8 /// Error indicating an invalid size of the reply received from the BMS.
9 #[error("Invalid reply size")]
10 ReplySizeError,
11
12 /// Error indicating that a frame was received out of order.
13 #[error("Frame out of order")]
14 FrameNoError,
15}