A library that contains a macro for a simpler generator->iterator creation
Use latest nightly
cargo add simple_generators
or:
toml
[dependencies]
simple_generators = { version="0.1.3" }
example:
```rust
use simple_generators::*;
fn main() {
println!("{}", test_macro(10).sum::
let foo = Foo {
vec: vec![10, 20, 30],
};
for e in foo.test_macro() {
println!("{}", e);
}
}
fn test_macro(n: u64) -> impl Iterator
struct Foo {
vec: Vec
impl Foo {
#[generator]
fn test_macro<'a>(&'a self) -> impl Iterator