/// Applies `f` to the wrapped algorithm and converts the step in the result to a sender queue
/// step, deferring or dropping messages, where necessary.
Applies `f` to the wrapped algorithm and converts the step in the result to a sender queue
step, deferring or dropping messages, where necessary.
Applies ` f ` to the wrapped algorithm and converts the step in the result to a sender queue step deferring or dropping messages where necessary .
fn apply<F>(&mut self, f: F) -> Result<CpStep<Self>, Error<D::Error>>
    where
        F: FnOnce(&mut D) -> Result<CpStep<D>, D::Error>,
    {
        let mut step = f(&mut self.algo).map_err(Error::Apply)?;
        let mut sender_queue_step = self.update_epoch(&step);
        self.defer_messages(&mut step);
        sender_queue_step.extend(step.map(|output| output, |fault| fault, Message::from));
        Ok(sender_queue_step)
    }
fn apply < F > ( & mut self , f : F ) -> Result < CpStep < Self > , Error < D :: Error > > where F : FnOnce ( & mut D ) -> Result < CpStep < D > , D :: Error > , { let mut step = f ( & mut self . algo ) . map_err ( Error :: Apply ) ? ; let mut sender_queue_step = self . update_epoch ( & step ) ; self . defer_messages ( & mut step ) ; sender_queue_step . extend ( step . map ( | output | output , | fault | fault , Message :: from ) ) ; Ok ( sender_queue_step ) }
Applies `f` to the wrapped algorithm and converts the step in the result to a sender queue
step, deferring or dropping messages, where necessary.
Applies ` f ` to the wrapped algorithm and converts the step in the result to a sender queue step deferring or dropping messages where necessary .
&mut self
f
F