[−][src]Struct greenie::generator::Generator
Fields
state: Ptr<GeneratorState>
thread: Ptr<Context>
to: Ptr<Context>
is_join: bool
Methods
impl Generator
[src]
pub fn spawn<F: 'static, A: 'static + ApplyTo<F> + Clone>(
closure: F,
args: A
) -> Rc<Self>
[src]
closure: F,
args: A
) -> Rc<Self>
Spawn generator
pub fn resume(&self) -> Result<GeneratorState, &'static str>
[src]
Resumes the execution of this generator. This function will resume execution of the generator or start execution if it hasn't already. This call will return back into the generator's last suspension point, resuming execution from the latest yield. The generator will continue executing until it either yields or returns, at which point this function will return.
Auto Trait Implementations
impl !RefUnwindSafe for Generator
impl !Send for Generator
impl !Sync for Generator
impl Unpin for Generator
impl !UnwindSafe for Generator
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,