byteor_pipeline_spec/
error.rs1#[derive(Clone, Debug, PartialEq, Eq)]
5pub struct SpecError {
6 msg: &'static str,
7}
8
9impl SpecError {
10 pub const fn new(msg: &'static str) -> Self {
12 Self { msg }
13 }
14
15 pub const fn message(&self) -> &'static str {
17 self.msg
18 }
19}
20
21impl core::fmt::Display for SpecError {
22 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
23 write!(f, "{}", self.msg)
24 }
25}
26
27#[cfg(feature = "std")]
28impl std::error::Error for SpecError {}