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::OkFlow;

use crate::__internal::shared_step::OkMapStep;

impl<InputOk, OutputOk, MapperFn> OkFlow<InputOk> for OkMapStep<InputOk, OutputOk, MapperFn>
where
    MapperFn: Fn(InputOk) -> OutputOk,
{
    type OutputOk = OutputOk;

    /// Implementation of [`OkFlow::apply_ok`].
    fn apply_ok(&self, input_ok: InputOk) -> Self::OutputOk {
        self.apply(input_ok)
    }
}