Function heron::rapier_plugin::rapier::rayon::iter::plumbing::bridge[][src]

pub fn bridge<I, C>(
    par_iter: I,
    consumer: C
) -> <C as Consumer<<I as ParallelIterator>::Item>>::Result where
    C: Consumer<<I as ParallelIterator>::Item>,
    I: IndexedParallelIterator

This helper function is used to "connect" a parallel iterator to a consumer. It will convert the par_iter into a producer P and then pull items from P and feed them to consumer, splitting and creating parallel threads as needed.

This is useful when you are implementing your own parallel iterators: it is often used as the definition of the drive_unindexed or drive methods.