Trait libimagannotation::error::error::MapErrInto
[−]
pub trait MapErrInto<T> { fn map_err_into(
self,
error_kind: AnnotationErrorKind
) -> Result<T, AnnotationError>; }
Trait to replace
foo.map_err(Box::new).map_err(|e| SomeType::SomeErrorKind.into_error_with_cause(e)) // or: foo.map_err(|e| SomeType::SomeErrorKind.into_error_with_cause(Box::new(e)))
with much nicer
foo.map_err_into(SomeType::SomeErrorKind)
Required Methods
fn map_err_into(
self,
error_kind: AnnotationErrorKind
) -> Result<T, AnnotationError>
self,
error_kind: AnnotationErrorKind
) -> Result<T, AnnotationError>