[]Function astral::thirdparty::rayon::iter::plumbing::bridge_producer_consumer

pub fn bridge_producer_consumer<P, C>(
    len: usize,
    producer: P,
    consumer: C
) -> <C as Consumer<<P as Producer>::Item>>::Result where
    C: Consumer<<P as Producer>::Item>,
    P: Producer

This helper function is used to "connect" a producer and a consumer. You may prefer to call bridge, which wraps this function. This function will draw items from producer and feed them to consumer, splitting and creating parallel tasks when 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.