Crates.io | yield-iter |
lib.rs | yield-iter |
version | 0.2.1 |
source | src |
created_at | 2022-06-30 16:56:00.594422 |
updated_at | 2022-07-02 18:04:06.081809 |
description | Safe implementation of the `Iterator` trait for `Generator` |
homepage | https://github.com/uselessgoddess/yield-iter |
repository | https://github.com/uselessgoddess/yield-iter |
max_upload_size | |
id | 616506 |
size | 6,719 |
Iterator
trait for Generator
#![feature(generators, generator_trait)]
use yield_iter::generator;
fn main() {
let x = 10;
let iter = generator! {
let r = &x;
for i in 0..5u32 {
yield i * *r
}
};
}