Struct pushgen::generators::BoxedGenerator
source · pub struct BoxedGenerator<T> { /* private fields */ }
Available on crate feature
std
only.Expand description
Box a generator, type-erasing the actual generator type.
See .boxed()
for details.
Trait Implementations§
source§impl<T> Generator for BoxedGenerator<T>
impl<T> Generator for BoxedGenerator<T>
source§fn run(
&mut self,
output: impl FnMut(Self::Output) -> ValueResult
) -> GeneratorResult
fn run( &mut self, output: impl FnMut(Self::Output) -> ValueResult ) -> GeneratorResult
Run the generator, emitting values to the
output
closure. Read moresource§fn try_advance(&mut self, n: NonZeroUsize) -> (usize, GeneratorResult)
fn try_advance(&mut self, n: NonZeroUsize) -> (usize, GeneratorResult)
Try to advance the generator
n
values, ignoring them. Read more