lutra_bin/error.rs
1pub type Result<T, E = Error> = core::result::Result<T, E>;
2
3#[derive(thiserror::Error, Debug)]
4pub enum Error {
5 #[error("Type error: expected {expected}, but found {found}")]
6 BadValueType {
7 expected: &'static str,
8 found: &'static str,
9 },
10
11 #[error("Invalid data for given type")]
12 InvalidData,
13
14 #[error("Invalid type: type has no binary format")]
15 InvalidType,
16
17 #[error("Bug detected. Please file an issue.")]
18 Bug,
19}