Trait ruc::err::RucError [−][src]
pub trait RucError: Display + Debug + Send {
Show 14 methods
fn get_top_msg(&self) -> String;
fn get_lowest_msg(&self) -> String;
fn get_top_error(&self) -> String;
fn eq(&self, another: &dyn RucError) -> bool { ... }
fn eq_any(&self, another: &dyn RucError) -> bool { ... }
fn cause(&self) -> Option<&dyn RucError> { ... }
fn stringify_chain(&self, prefix: Option<&str>) -> String { ... }
fn print_die(&self) -> ! { ... }
fn print_die_debug(&self) -> ! { ... }
fn generate_log(&self, prefix: Option<&str>) -> String { ... }
fn generate_log_debug(&self) -> String { ... }
fn generate_log_custom(
&self,
debug_mode: bool,
prefix: Option<&str>
) -> String { ... }
fn print(&self, prefix: Option<&str>) { ... }
fn print_debug(&self) { ... }
}Expand description
the major trait defination
Required methods
fn get_top_msg(&self) -> String
fn get_top_msg(&self) -> String
convert the error of current level to string
fn get_lowest_msg(&self) -> String
fn get_lowest_msg(&self) -> String
convert the error of lowest level to string
fn get_top_error(&self) -> String
fn get_top_error(&self) -> String
“error msg” + “debug info”
Provided methods
check if any node from the error_chain matches the given error
fn stringify_chain(&self, prefix: Option<&str>) -> String
fn stringify_chain(&self, prefix: Option<&str>) -> String
generate the final error msg
fn print_die_debug(&self) -> !
fn print_die_debug(&self) -> !
Panic after printing error_chain
fn generate_log(&self, prefix: Option<&str>) -> String
fn generate_log(&self, prefix: Option<&str>) -> String
Generate the log string
fn generate_log_debug(&self) -> String
fn generate_log_debug(&self) -> String
Generate log in the original rust debug format
Generate the log string with custom mode
fn print_debug(&self)
fn print_debug(&self)
Print log in rust debug format