AsMoreError

Trait AsMoreError 

Source
pub trait AsMoreError<T> {
    // Required methods
    fn as_m(
        self,
        file_line_func_text: (&str, u32, &str, &str),
    ) -> Result<T, MoreError>;
    fn to_m(self) -> Result<T, MoreError>;
}
Expand description

给 Error, … 增加更多信息, 但抛弃 Error, … 自身的内容

Required Methods§

Source

fn as_m( self, file_line_func_text: (&str, u32, &str, &str), ) -> Result<T, MoreError>

附加文件名、行号、函数名、附加说明, 抛弃 Error 自身的内容

Source

fn to_m(self) -> Result<T, MoreError>

转化为 MoreError, 不附加信息

Implementations on Foreign Types§

Source§

impl<T, E> AsMoreError<T> for Result<T, E>
where E: Debug,

Source§

fn as_m( self, file_line_func_text: (&str, u32, &str, &str), ) -> Result<T, MoreError>

附加文件名、行号、函数名、附加说明, 抛弃 Error 自身的内容

Source§

fn to_m(self) -> Result<T, MoreError>

转化为 MoreError, 不附加信息

Implementors§