| 5 | #[derive(Debug, Clone, PartialEq, Eq)] |
| 6 | #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] |
| 7 | pub struct IndexIsOutOfBounds { |
| 8 | pub index: usize, |
| 9 | pub length: usize, |
| 10 | } |
| 11 | |
| 12 | /// Maps supplied iterator and attempts to pair each `Ok(_)` item with an item from the slice which has provided index. |
| 13 | /// Returns `Err` containing an invalid index in case slice length is exceeded. |