pollex/arm32/error/
arm_classify_error.rs1use core::convert::Infallible;
10use core::fmt::{self, Display, Formatter};
11
12#[derive(Clone, Debug)]
14pub struct ArmClassifyError {
15 pub raw_opcode: u32,
17}
18
19impl Display for ArmClassifyError {
20 #[inline]
21 fn fmt(&self, f: &mut Formatter) -> fmt::Result {
22 write!(f, "unable to classify arm opcode `{:#034b}`", self.raw_opcode)
23 }
24}
25
26impl core::error::Error for ArmClassifyError { }
27
28impl From<Infallible> for ArmClassifyError {
29 #[inline(always)]
30 fn from(_value: Infallible) -> Self {
31 unreachable!()
32 }
33}