#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CanError {
DataTooLong,
InvalidFdLength,
}
impl core::fmt::Display for CanError {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
match self {
CanError::DataTooLong => f.write_str("can frame data exceeds the maximum length"),
CanError::InvalidFdLength => {
f.write_str("can-fd data length is not a valid frame length")
}
}
}
}
impl core::error::Error for CanError {}