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 Customer Managed Key (CMK) operations.
//!
//! This module provides error types for operations involving Customer Managed Keys,
//! which are used for encrypting and managing Data Encryption Keys (DEKs).
//! These errors may occur during key retrieval, token generation, or authentication.

use core::fmt;

/// Represents an error encountered during CMK token operations.
///
/// This error type is used when operations involving CMK tokens fail, such as:
/// - Token generation failures
/// - Authentication errors
/// - Key retrieval problems
/// - Permission issues
#[derive(Debug, Eq, PartialEq)]
pub struct CMKError(pub String);

impl fmt::Display for CMKError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "Error fetching CMK token: {}", self.0)
    }
}