[][src]Trait asparit::WithProducer

pub trait WithProducer<'a> {
    type Item: Send + 'a;
    pub fn with_producer<CB>(self, callback: CB) -> CB::Output
    where
        CB: ProducerCallback<'a, Self::Item>
; }

Associated Types

type Item: Send + 'a

Loading content...

Required methods

pub fn with_producer<CB>(self, callback: CB) -> CB::Output where
    CB: ProducerCallback<'a, Self::Item>, 

Internal method used to define the behavior of this parallel iterator. You should not need to call this directly.

This method converts the iterator into a producer P and then invokes callback.callback() with P. Note that the type of this producer is not defined as part of the API, since callback must be defined generically for all producers. This allows the producer type to contain references; it also means that parallel iterators can adjust that type without causing a breaking change.

See the README for more details on the internals of parallel iterators.

Loading content...

Implementors

Loading content...