yield-iter

Crates.ioyield-iter
lib.rsyield-iter
version0.2.1
sourcesrc
created_at2022-06-30 16:56:00.594422
updated_at2022-07-02 18:04:06.081809
descriptionSafe implementation of the `Iterator` trait for `Generator`
homepagehttps://github.com/uselessgoddess/yield-iter
repositoryhttps://github.com/uselessgoddess/yield-iter
max_upload_size
id616506
size6,719
(uselessgoddess)

documentation

README

Safe implementation of the Iterator trait for Generator

Usage

#![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
        }
    };
}
Commit count: 7

cargo fmt