1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
//! Error Handling.
//!
//! This is a private module. Its public content is being re-exported by the
//! parent module.


//------------ Error ---------------------------------------------------------

/// An error happened while decoding data.
#[derive(Clone, Copy, Debug, Display, Eq, PartialEq)]
pub enum Error {
    /// The data didn’t conform to the expected structure.
    #[display(fmt="malformed data")]
    Malformed,

    /// An encoding used by the data is not yet implemented by the crate.
    #[display(fmt="format not implemented")]
    Unimplemented,
}