Skip to main content

UserFriendlyError

Trait UserFriendlyError 

Source
pub trait UserFriendlyError {
    // Required methods
    fn user_message(&self) -> String;
    fn context(&self) -> Option<String>;
    fn suggestions(&self) -> Vec<String>;
    fn category(&self) -> ErrorCategory;
}
Expand description

Trait for providing user-friendly error reporting with context and suggestions

Required Methods§

Source

fn user_message(&self) -> String

Get a user-friendly error message

Source

fn context(&self) -> Option<String>

Get contextual information about the error

Source

fn suggestions(&self) -> Vec<String>

Get suggested actions to resolve the error

Source

fn category(&self) -> ErrorCategory

Get the error category for grouping similar errors

Implementors§