map_iterator

Function map_iterator 

Source
pub const fn map_iterator<'src, I, O, IO, BO, IBO>(
    a: impl Task<'src, I, IO>,
    b: impl Task<'src, O, BO> + Clone + Send + 'src,
) -> impl Task<'src, I, IBO>
where IO: Iterator<Item = O> + Send + 'src, BO: Send + 'src, IBO: Iterator<Item = BO> + Send + 'src,
Expand description

Combine two tasks by feeding the output of one into the next, mapping a Option to another and passing None through. Analogous to Option::map.

For ergonomics, TaskOptionExt::map should be preferred, but until const trait functions are stabilized this function permits constructing a Task to be evaluated at compile time.