kape-memory 0.1.3

In-memory backend adapter for Kape.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use kape::KapeError;
use thiserror::Error;

/// An in-memory adapter failure.
#[derive(Clone, Copy, Debug, Eq, Error, PartialEq)]
pub enum MemoryError {
    /// The requested TTL cannot be represented by `Instant`.
    #[error("TTL exceeds the in-memory clock range")]
    TtlOverflow,
}

impl From<MemoryError> for KapeError {
    fn from(error: MemoryError) -> Self {
        Self::backend(error)
    }
}