Struct switcheroo::Generator [−][src]
pub struct Generator<'a, Input: 'a, Output: 'a, Stack: Stack> { /* fields omitted */ }
Generator wraps a closure and allows suspending its execution more than once, returning a value each time.
If the closure finishes each other call to resume
will yield None
. If the closure panics the unwind will happen correctly across contexts.
Implementations
impl<'a, Input, Output, Stack> Generator<'a, Input, Output, Stack> where
Input: 'a,
Output: 'a,
Stack: Stack,
[src]
impl<'a, Input, Output, Stack> Generator<'a, Input, Output, Stack> where
Input: 'a,
Output: 'a,
Stack: Stack,
[src]Trait Implementations
impl<'a, Input, Output, Stack> Drop for Generator<'a, Input, Output, Stack> where
Input: 'a,
Output: 'a,
Stack: Stack,
[src]
impl<'a, Input, Output, Stack> Drop for Generator<'a, Input, Output, Stack> where
Input: 'a,
Output: 'a,
Stack: Stack,
[src]impl<'a, Input, Output, Stack> Send for Generator<'a, Input, Output, Stack> where
Input: 'a,
Output: 'a,
Stack: Stack,
[src]
Input: 'a,
Output: 'a,
Stack: Stack,
Auto Trait Implementations
impl<'a, Input, Output, Stack> RefUnwindSafe for Generator<'a, Input, Output, Stack> where
Input: RefUnwindSafe,
Output: RefUnwindSafe,
Stack: RefUnwindSafe,
Input: RefUnwindSafe,
Output: RefUnwindSafe,
Stack: RefUnwindSafe,
impl<'a, Input, Output, Stack> !Sync for Generator<'a, Input, Output, Stack>
impl<'a, Input, Output, Stack> Unpin for Generator<'a, Input, Output, Stack> where
Stack: Unpin,
Stack: Unpin,
impl<'a, Input, Output, Stack> UnwindSafe for Generator<'a, Input, Output, Stack> where
Input: RefUnwindSafe,
Output: RefUnwindSafe,
Stack: UnwindSafe,
Input: RefUnwindSafe,
Output: RefUnwindSafe,
Stack: UnwindSafe,