ps_hash/
error.rs

1#![allow(clippy::module_name_repetitions)]
2
3use ps_ecc::{RSDecodeError, RSGenerateParityError};
4use thiserror::Error;
5
6#[derive(Clone, Debug, Error, PartialEq, Eq)]
7pub enum HashError {
8    #[error(transparent)]
9    RSGenerateParityError(#[from] RSGenerateParityError),
10}
11
12#[derive(Clone, Debug, Error, PartialEq, Eq)]
13pub enum HashValidationError {
14    #[error("Invalid Hash length: {0}")]
15    InvalidLength(usize),
16    #[error(transparent)]
17    RSDecodeError(#[from] RSDecodeError),
18}