for-loop-iterator 0.2.2

Iterators like traditional for loops
Documentation
  • Coverage
  • 66.67%
    2 out of 3 items documented0 out of 2 items with examples
  • Size
  • Source code size: 5.81 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.97 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • jaymehta-g

For Loop Iterators

Allows you to create Rust iterators that act like traditional for loops!

Iterators will produce values just like for loops do

Examples

// A for loop in Java
for (int i = 0; i < 10; i++>) {
	out.println(i);
}
// A Rust Iterator that performs the same function
ForLoopIterator::new(
        0,					// Initial Value
        |i| i < &10,		// Predicate that returns true if a value should be returned
        |i| i + 1		// Function that, given a value from the iterator, returns the next one
    )
	.for_each( |i| {
		println!("{i}");
	});