Struct ruc::err::SimpleError
source · [−]Expand description
A pre-impled Error
Implementations
Trait Implementations
sourceimpl<E: Debug + Display + Send + 'static> From<SimpleError<E>> for Box<dyn RucError>
impl<E: Debug + Display + Send + 'static> From<SimpleError<E>> for Box<dyn RucError>
sourcefn from(e: SimpleError<E>) -> Box<dyn RucError>
fn from(e: SimpleError<E>) -> Box<dyn RucError>
Converts to this type from the input type.
sourceimpl<E: Debug + Display + Send + 'static> RucError for SimpleError<E>
impl<E: Debug + Display + Send + 'static> RucError for SimpleError<E>
sourcefn get_top_msg(&self) -> String
fn get_top_msg(&self) -> String
get the top-level error message
sourcefn get_lowest_msg(&self) -> String
fn get_lowest_msg(&self) -> String
get the final(lowest) error message
sourcefn 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
. Read moresourcefn get_top_msg_with_dbginfo(&self) -> String
fn get_top_msg_with_dbginfo(&self) -> String
“error msg” + “debug info”
sourcefn lowest_type_id(&self) -> TypeId
fn lowest_type_id(&self) -> TypeId
get the type of the lowest(bottom) error
sourcefn lowest_is_type(&self, e: &dyn Any) -> bool
fn lowest_is_type(&self, e: &dyn Any) -> bool
check the type of the lowest error
sourcefn contains_type(&self, e: &dyn Any) -> bool
fn contains_type(&self, e: &dyn Any) -> bool
check if an error exists in the error chain
sourcefn 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
sourcefn stringify_chain(&self, prefix: Option<&str>) -> String
fn stringify_chain(&self, prefix: Option<&str>) -> String
generate the final error msg
sourcefn print_die_debug(&self) -> !
fn print_die_debug(&self) -> !
Panic after printing
error_chain
sourcefn generate_log(&self, prefix: Option<&str>) -> String
fn generate_log(&self, prefix: Option<&str>) -> String
Generate the log string
sourcefn generate_log_debug(&self) -> String
fn generate_log_debug(&self) -> String
Generate log in the original
rust debug
formatsourcefn 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
sourcefn print_debug(&self)
fn print_debug(&self)
Print log in
rust debug
formatAuto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more