fn main() { let blobs = Blobs::new(128 * 1024); for blob in blobs.take(10) { println!("{}", blob.len()); } } struct Blobs { size: usize, } impl Blobs { fn new(size: usize) -> Self { Self { size } } } impl Iterator for Blobs { type Item = Vec; fn next(&mut self) -> Option { Some(vec![0; self.size]) } }