pub struct SimpleError<E: Debug + Display + Send + 'static> { /* private fields */ }Expand description
A pre-impled Error
Implementations§
Trait Implementations§
Source§impl<E: Debug + Display + Send + 'static> RucError for SimpleError<E>
impl<E: Debug + Display + Send + 'static> RucError for SimpleError<E>
Source§fn get_top_msg(&self) -> String
fn get_top_msg(&self) -> String
get the top-level error message
Source§fn get_lowest_msg(&self) -> String
fn get_lowest_msg(&self) -> String
get the final(lowest) error message
Source§fn get_lowest_err(&self) -> &dyn RucError
fn get_lowest_err(&self) -> &dyn RucError
Get the original error object,
used to match its original type by
Any.Source§fn get_top_msg_with_dbginfo(&self) -> String
fn get_top_msg_with_dbginfo(&self) -> String
“error msg” + “debug info”
Source§fn lowest_type_id(&self) -> TypeId
fn lowest_type_id(&self) -> TypeId
get the type of the lowest(bottom) error
Source§fn lowest_is_type(&self, e: &dyn Any) -> bool
fn lowest_is_type(&self, e: &dyn Any) -> bool
check the type of the lowest error
Source§fn contains_type(&self, e: &dyn Any) -> bool
fn contains_type(&self, e: &dyn Any) -> bool
check if an error exists in the error chain
Source§fn msg_has_overloop(&self, another: &dyn RucError) -> bool
fn msg_has_overloop(&self, another: &dyn RucError) -> bool
check if any node from the error_chain matches the given error
Source§fn print_die_debug(&self) -> !
fn print_die_debug(&self) -> !
Panic after printing
error_chainSource§fn generate_log_debug(&self) -> String
fn generate_log_debug(&self) -> String
Generate log in the original
rust debug formatSource§fn generate_log_custom(&self, debug_mode: bool, prefix: Option<&str>) -> String
fn generate_log_custom(&self, debug_mode: bool, prefix: Option<&str>) -> String
Generate the log string with custom mode
Source§fn print_debug(&self)
fn print_debug(&self)
Print log in
rust debug formatAuto Trait Implementations§
impl<E> Freeze for SimpleError<E>where
E: Freeze,
impl<E> !RefUnwindSafe for SimpleError<E>
impl<E> Send for SimpleError<E>
impl<E> !Sync for SimpleError<E>
impl<E> Unpin for SimpleError<E>where
E: Unpin,
impl<E> !UnwindSafe for SimpleError<E>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more