#iterator #extension #buffered #stateful #threaded #error #memory

iterators_extended

Some useful extensions to Rust's iterators

1 unstable release

new 0.1.0 Dec 11, 2024

#756 in Algorithms

Download history 147/week @ 2024-12-09

147 downloads per month

MIT license

20KB
561 lines

Extended Iterators

Some useful extensions to rust's iterators.

Modules

  • buffered: Maintains a buffer of items in memory.
  • interleave: Interleaves two iterators.
  • logging: Unwraps Result items, debug printing any errors.
  • stateful: Maps a function to items, but allows passing a struct to be used as "working" state. Eg. when the function needs to allocate a lot of memory to compute intermediate values.
  • threaded: Multi-threaded map that maintains the ordering of items in the iterator.
  • stateful_threaded: Combination of the stateful and threaded modules.

No runtime deps