Struct ::std::ops::Generator
The return value of a function producing a generator.
Functions which contain the yield
keyword produces generators.
Examples
use Generator;
let g = generate;
assert!
Methods
Advance a generator producing the next value yielded.
Unlike [Generator::resume
], this can only consume the yielded values.
Examples
use ;
let g = generate;
assert_eq!;
assert_eq!;
assert_eq!;
``
Advance a generator producing the next GeneratorState
.
Examples
use ;
let g = generate;
assert_eq!;
assert_eq!;
assert_eq!;
``
Protocols
protocol into_iter
for item in value
Allows the value to be converted into an iterator in a for-loop.