Skip to main content

fold_events

Function fold_events 

Source
pub fn fold_events<B>(
    behavior: &mut B,
    events: impl IntoIterator<Item = B::Event>,
) -> Result<Folded<B::Addr, B::Sends, <B::Birth as BirthMode>::Child>, B::Error>
where B: Behavior<Ph = Never>,
Expand description

Initialize a behavior and left-fold events until exhaustion, controlled failure, or the first stop verdict.

ยงErrors

Returns the first controlled behavior failure.