aprs_encode/
errors.rs

1use core::fmt::Display;
2
3use arrayvec::CapacityError;
4
5#[derive(Debug)]
6pub struct PackError {}
7
8impl From<CapacityError<char>> for PackError {
9    fn from(_: CapacityError<char>) -> Self {
10        Self {}
11    }
12}
13
14impl <'a> From<CapacityError<&'a str>> for PackError {
15    fn from(_: CapacityError<&'a str>) -> Self {
16        Self {}
17    }
18}
19
20impl Display for PackError {
21    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
22        write!(f, "Failed to pack data. Out of space")
23    }
24}