pub trait IntoRunError {
// Required method
fn into_run_err(self) -> RunError;
}Expand description
将 OML 错误转换为 RunError,并保留解析详情。
conv_err() 仅按 reason 转换(OMLCodeReason → RunReason),
而 OML 的富错误消息([path]/[where]/[error])存放在
Syntax/NotFound 的 inner String 中、不在 StructError 的 detail 字段里,
因此转换后会被压缩为无 detail 的配置错误。
本 trait 把 inner 消息提取为 detail 并保留 source,供加载层调用。
Required Methods§
fn into_run_err(self) -> RunError
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".