modbus_relay/errors/kinds/frame_size.rs
1#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2pub enum FrameSizeKind {
3 TooShort,
4 TooLong,
5 BufferOverflow,
6}
7
8impl std::fmt::Display for FrameSizeKind {
9 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10 match self {
11 Self::TooShort => write!(f, "Frame too short"),
12 Self::TooLong => write!(f, "Frame too long"),
13 Self::BufferOverflow => write!(f, "Buffer overflow"),
14 }
15 }
16}