Skip to main content

PollSyncIter

Trait PollSyncIter 

Source
pub trait PollSyncIter: AsyncIterator {
    // Provided method
    fn poll_sync_iter(
        self: Pin<&mut Self>,
        cx: &mut Context<'_>,
    ) -> Poll<SyncIter<IntoIter<Self::Item>>>
       where Self: Sized + Unpin { ... }
}

Provided Methods§

Source

fn poll_sync_iter( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<SyncIter<IntoIter<Self::Item>>>
where Self: Sized + Unpin,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<B, I, F, Fut> PollSyncIter for AsyncMap<I, F>
where I: AsyncIterator + Unpin, F: FnMut(I::Item) -> Fut + Unpin + Send, Fut: Future<Output = B> + Send,

Enables conversion of an AsyncMap into a synchronous SyncIter by polling the async iterator and collecting items into a vector. Implements the PollSyncIter trait, allowing integration with the Future implementation below.

Source§

impl<I, F, Fut> PollSyncIter for AsyncFilter<I, F>
where I: AsyncIterator, F: FnMut(I::Item) -> Fut, Fut: Future<Output = bool>, I::Item: Clone,