PC - Producer Constructor. Enables usage of !Send and !Sync objects
in the producer function.
XC - Xform (closure) Constructor. Enables usage of !Send and !Sync
objects in the transform closure. This can be used for creating thread
local caches, like large allocations re-used by different tasks,
packaged as a closure.
P - Producer iterator. Consumed internally by the transform/worker
threads.
X - Xform closure. Applied to each job item produced by the producer
iterator, in parallel by multiple worker threads. This can be FnMut
since it’s owned by a dedicated worker thread and will never be called
by some other thread. The closure can safely store and reuse mutable
resources between job items, for example large memory allocations.
I - Input item. Or task, produced by the producer iterator,
transformed by the Xform closures.
O - Output item. Returned by the Xform closure(s) and by the
Iterator::next method.
Creates an iterator which can use the peek and peek_mut methods
to look at the next element of the iterator without consuming it. See
their documentation for more information. Read more
🔬This is a nightly-only experimental API. (iter_map_windows)
Calls the given function f for each contiguous window of size N over
self and returns an iterator over the outputs of f. Like slice::windows(),
the windows during mapping overlap as well. Read more
🔬This is a nightly-only experimental API. (iter_is_partitioned)
Checks if the elements of this iterator are partitioned according to the given predicate,
such that all those that return true precede all those that return false. Read more
🔬This is a nightly-only experimental API. (iterator_try_reduce)
Reduces the elements to a single one by repeatedly applying a reducing operation. If the
closure returns a failure, the failure is propagated back to the caller immediately. Read more
Lexicographically compares the PartialOrd elements of
this Iterator with those of another. The comparison works like short-circuit
evaluation, returning a result without comparing the remaining elements.
As soon as an order can be determined, the evaluation stops and a result is returned. Read more