Skip to main content

ErrorFormatTrait

Trait ErrorFormatTrait 

Source
pub trait ErrorFormatTrait {
    // Required methods
    fn format_user_message(&self) -> String;
    fn format_developer_message(&self) -> String;
    fn format_log_message(&self) -> String;
    fn format_json(&self) -> Result<Value>;
}
Expand description

错误格式化特征

Required Methods§

Source

fn format_user_message(&self) -> String

格式化为用户友好的消息

Source

fn format_developer_message(&self) -> String

格式化为开发者友好的消息

Source

fn format_log_message(&self) -> String

格式化为日志消息

Source

fn format_json(&self) -> Result<Value>

格式化为JSON

Implementors§