pub trait MapProblemOr {
type ProblemCarrier;
// Required methods
fn map_problem_or(self, problem: impl Into<Problem>) -> Self::ProblemCarrier;
fn map_problem_or_else<F, P>(self, problem: F) -> Self::ProblemCarrier
where F: FnOnce() -> P,
P: Into<Problem>;
}
Expand description
Map type not containing any error to type containing given Problem
Required Associated Types§
type ProblemCarrier
Required Methods§
fn map_problem_or(self, problem: impl Into<Problem>) -> Self::ProblemCarrier
fn map_problem_or_else<F, P>(self, problem: F) -> Self::ProblemCarrier
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl<O, E> MapProblemOr for Result<O, Option<E>>
Mapping Result
with Option<E>
to Result
with Problem
where E
implements Into<Problem>
impl<O, E> MapProblemOr for Result<O, Option<E>>
Mapping Result
with Option<E>
to Result
with Problem
where E
implements Into<Problem>