SecureError

Trait SecureError 

Source
pub trait SecureError: Display + Debug {
    // Required methods
    fn public_message(&self) -> String;
    fn internal_message(&self) -> String;
    fn debug_message(&self) -> String;
    fn error_level(&self) -> ErrorLevel;
    fn error_context(&self) -> ErrorContext;

    // Provided method
    fn error_id(&self) -> String { ... }
}
Expand description

Trait for secure error handling with multiple disclosure levels

Required Methods§

Source

fn public_message(&self) -> String

Get the public-safe error message

Source

fn internal_message(&self) -> String

Get the internal error message for logging

Source

fn debug_message(&self) -> String

Get the debug error message (development only)

Source

fn error_level(&self) -> ErrorLevel

Get the error classification level

Source

fn error_context(&self) -> ErrorContext

Get the error context

Provided Methods§

Source

fn error_id(&self) -> String

Generate a unique error ID for correlation

Implementors§