cl_aux/structures/error.rs
1use core::fmt::{Debug, Display, Formatter};
2
3/// Groups all possible crate errors
4#[derive(Clone, Copy, Debug, Eq, PartialEq)]
5pub enum Error {
6 /// It is not possible to insert an already existing element
7 AlreadyExistingElement,
8 /// Structure can't store more elements
9 InsufficientCapacity(u32),
10 /// Index is out of structure bounds
11 OutOfBounds(u32),
12}
13
14impl Display for Error {
15 #[inline]
16 fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), core::fmt::Error> {
17 Debug::fmt(self, f)
18 }
19}