Skip to main content

hermes_core/
error.rs

1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum EncodeError {
5    #[error("bincode encode: {0}")]
6    Bincode(#[from] bincode::error::EncodeError),
7}
8
9#[derive(Debug, Error)]
10pub enum DecodeError {
11    #[error("bincode decode: {0}")]
12    Bincode(#[from] bincode::error::DecodeError),
13
14    #[error("unknown subject: {0}")]
15    UnknownSubject(String),
16
17    #[error("invalid subject JSON: {0}")]
18    InvalidSubject(String),
19}