result-transformer-flow 0.0.2

Traits, macros and utilities for transforming Result values.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::sync::flow::ErrFlow;

use crate::__internal::shared_step::ErrMapStep;

impl<InputErr, OutputErr, MapperFn> ErrFlow<InputErr> for ErrMapStep<InputErr, OutputErr, MapperFn>
where
    MapperFn: Fn(InputErr) -> OutputErr,
{
    type OutputErr = OutputErr;

    /// Implementation of [`ErrFlow::apply_err`].
    fn apply_err(&self, input_err: InputErr) -> Self::OutputErr {
        self.apply(input_err)
    }
}