rushdb_types/error.rs
1use thiserror::Error;
2
3/// Errors produced while encoding, decoding or parsing canonical types.
4#[derive(Debug, Clone, PartialEq, Eq, Error)]
5pub enum TypesError {
6 /// The scalar does not match the declared logical type.
7 #[error("unencodable value for type {0:?}")]
8 Unencodable(&'static str),
9 /// A serialized logical type tag is not recognized.
10 #[error("unknown logical type tag {0}")]
11 UnknownTypeTag(u8),
12 /// The input bytes do not form a valid encoded value.
13 #[error("malformed key bytes")]
14 MalformedKey,
15}