lucet_module_data/
error.rs

1use failure::Fail;
2
3/// Module data (de)serialization errors.
4#[derive(Debug, Fail)]
5pub enum Error {
6    #[fail(display = "Sparse data contained a page with length other than 4096")]
7    IncorrectPageSize,
8    #[fail(display = "Deserialization error: {}", _0)]
9    DeserializationError(#[cause] bincode::Error),
10    #[fail(display = "Serialization error: {}", _0)]
11    SerializationError(#[cause] bincode::Error),
12    #[fail(display = "Module signature error: {}", _0)]
13    ModuleSignatureError(#[cause] minisign::PError),
14    #[fail(display = "I/O error: {}", _0)]
15    IOError(#[cause] std::io::Error),
16}