Skip to main content

cuckoo_cache/
error.rs

1//! Errors returned by the cuckoo cache API.
2
3use thiserror::Error;
4
5#[derive(Error, Debug, PartialEq, Eq, Copy, Clone)]
6/// Possible errors returned by the cuckoo cache API.
7pub enum CuckooCacheError {
8    #[error("item oversized ({size} bytes, max {max} bytes)")]
9    ItemOversized { size: usize, max: usize },
10    #[error("item not found")]
11    NotFound,
12    #[error("item is not numeric")]
13    NotNumeric,
14}