Skip to main content

drive_next

Function drive_next 

Source
pub async fn drive_next<Iter, Body, Output>(iter: Iter, body: Body) -> Output
where Iter: IntoAsyncIterator, Body: AsyncFnOnce(DrivenAsyncIterator<'_, Iter::IntoAsyncIter>) -> Output,
Expand description

Take ownership of an AsyncIterator, create a DrivenAsyncIterator handle for it, and call the user’s closure with that handle as an argument. The handle has an async .next() method.