kape_memory/error.rs
1use kape::KapeError;
2use thiserror::Error;
3
4/// An in-memory adapter failure.
5#[derive(Clone, Copy, Debug, Eq, Error, PartialEq)]
6pub enum MemoryError {
7 /// The requested TTL cannot be represented by `Instant`.
8 #[error("TTL exceeds the in-memory clock range")]
9 TtlOverflow,
10}
11
12impl From<MemoryError> for KapeError {
13 fn from(error: MemoryError) -> Self {
14 Self::backend(error)
15 }
16}