printerator
Print iterators without having to collect them.
Examples
# use PrinterateDebug;
let ints: = ;
println!;
# use PrinterateDisplay;
let data = "Hello, w🌍rld!";
let mut nonascii_iter = data.bytes.enumerate.filter;
println!;
Available in 2 flavors: A debug printer, and a display printer, both of
which are createble over any iterator whose item is implementing either
[Debug] or [Display], using the methods printerd and printer respectively.
Formatting options are passed as-is to the [Iterator::Item]'s implementation of
[Debug] and [Display]. That means you should pass them in as if you were
formatting 1 single item.
printer{d}_with_options arguments:
pretty: true if you want newlines and brackets:
[
item,
item2,
item3
]
[
0: item,
1: item2
]
otherwise, false:
item, item2, item3
0: item, 1: item2
indices: true if you want the indices too:
[
0: item,
1: item2
]
0: item, 1: item2, 2: item3
otherwise, false:
[
item,
item2
]
item, item2