cl_traits/structures/
error.rs

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