light_indexed_array/
errors.rs1use light_hasher::HasherError;
2use thiserror::Error;
3
4#[derive(Debug, Error, PartialEq)]
5pub enum IndexedArrayError {
6 #[error("Integer overflow")]
7 IntegerOverflow,
8 #[error("Invalid index, it exceeds the number of elements.")]
9 IndexHigherThanMax,
10 #[error("Could not find the low element.")]
11 LowElementNotFound,
12 #[error("Low element is greater or equal to the provided new element.")]
13 LowElementGreaterOrEqualToNewElement,
14 #[error("The provided new element is greater or equal to the next element.")]
15 NewElementGreaterOrEqualToNextElement,
16 #[error("The element already exists, but was expected to be absent.")]
17 ElementAlreadyExists,
18 #[error("The element does not exist, but was expected to be present.")]
19 ElementDoesNotExist,
20 #[error("Hasher error: {0}")]
21 Hasher(#[from] HasherError),
22 #[error("Indexed array is full, cannot append more elements")]
23 ArrayFull,
24}