result-transformer-flow 0.0.1

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

use crate::__internal::shared_step::OkInspectStep;

impl<InspectorFn, OkType> OkFlow<OkType> for OkInspectStep<InspectorFn, OkType>
where
    InspectorFn: Fn(&OkType),
{
    type OutputOk = OkType;

    /// Implementation of [`OkFlow::apply_ok`].
    /// Passes the success value to the inspector and returns it.
    fn apply_ok(&self, input_ok: OkType) -> Self::OutputOk {
        self.apply(input_ok)
    }
}