trelent-hyok 0.1.12

A Rust library implementing Hold Your Own Key (HYOK) encryption patterns with support for multiple cloud providers
Documentation
//! Error types related to DEK caching operations.
//!
//! This module provides error types that may occur during Data Encryption Key (DEK)
//! caching operations, such as cache misses, storage failures, or invalidation issues.

use core::fmt;

/// Represents an error encountered when accessing or manipulating the DEK cache.
///
/// This error type is used when operations on the DEK cache fail, such as:
/// - Cache insertion failures
/// - Cache retrieval errors
/// - Cache invalidation issues
/// - Storage capacity problems
#[derive(Debug, Eq, PartialEq)]
pub struct CacheError(pub String);

impl fmt::Display for CacheError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "A cache error occurred: {}", self.0)
    }
}