Trait myutil::err::RucError

source ·
pub trait RucError: Display + Debug + Send {
Show 17 methods fn type_id(&self) -> TypeId; fn get_top_msg(&self) -> String; fn get_lowest_msg(&self) -> String; fn get_lowest_err(&self) -> &dyn RucError; fn get_top_msg_with_dbginfo(&self) -> String; fn type_ids(&self) -> Vec<TypeId> { ... } fn lowest_type_id(&self) -> TypeId { ... } fn lowest_is_type(&self, e: &dyn Any) -> bool { ... } fn contains_type(&self, e: &dyn Any) -> bool { ... } fn msg_eq(&self, another: &dyn RucError) -> bool { ... } fn msg_has_overloop(&self, another: &dyn RucError) -> bool { ... } fn cause(&self) -> Option<&dyn RucError> { ... } fn stringify_chain(&self, prefix: Option<&str>) -> String { ... } fn print_die(&self) -> ! { ... } fn generate_log(&self, prefix: Option<&str>) -> String { ... } fn generate_log_custom(&self, prefix: Option<&str>) -> String { ... } fn print(&self, prefix: Option<&str>) { ... }
}
Expand description

the major trait defination

Required Methods§

type id of current error type

convert the error of current level to string

convert the error of lowest level to string

Get the original error object, used to match its original type by Any.

“error msg” + “debug info”

Provided Methods§

type ids of errors of each level(from top to bottom).

get the type of the lowest(bottom) error

check the type of the lowest error

check if an error exists in the error chain

compare two object

check if any node from the error_chain matches the given error

point to a error which caused current error

generate the final error msg

Panic after printing error_chain

Generate the log string

Generate the log string with custom mode

Print log

Trait Implementations§

Converts to this type from the input type.
Converts to this type from the input type.

Implementors§