Skip to main content

asimov_id/
key_error.rs

1// This is free and unencumbered software released into the public domain.
2
3use thiserror::Error;
4
5#[derive(Clone, Debug, Eq, Error, PartialEq)]
6pub enum KeyError {
7    #[error("empty input")]
8    EmptyInput,
9
10    #[error("invalid length")]
11    InvalidLength,
12
13    #[error("invalid prefix")]
14    InvalidPrefix,
15
16    #[error("invalid encoding: {0}")]
17    InvalidEncoding(bs58::decode::Error),
18}