1use std::result::Result as StdResult;
4
5pub type Result<T> = StdResult<T, Error>;
8
9#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
11pub enum Error {
12 #[error("wrong number of bytes to construct Prefix")]
13 PrefixByteLength,
14 #[error("prefix characters may only be 7-bit ASCII values of 2-7,a-z,A-Z")]
15 InvalidPrefix {
16 valid_until: usize,
18 },
19 #[error("attempted to deserialize OID without a prefix")]
20 MissingPrefix,
21 #[error("deserialize OID without a separator")]
22 MissingSeparator,
23 #[error("attempted to deserialize OID without a value")]
24 MissingValue,
25 #[error("UUID error: {0}")]
26 Uuid(#[from] uuid::Error),
27 #[error("base32hex Decode error: {0}")]
28 Base32Decode(#[from] data_encoding::DecodeError),
29}