fits_io/
error.rs

1use alloc::string::String;
2use alloc::string::ToString;
3use core::fmt::Display;
4use thiserror::Error;
5
6#[derive(Debug, Error)]
7pub enum Error {
8    #[error("Deserialization error: {0}")]
9    DeserializationError(String),
10}
11
12#[cfg(feature = "serde")]
13impl serde::de::Error for Error {
14    fn custom<T>(msg: T) -> Self
15    where
16        T: Display,
17    {
18        Self::DeserializationError(msg.to_string())
19    }
20}