[][src]Struct glsp::Coro

pub struct Coro { /* fields omitted */ }

The coro primitive type.

Coroutines can't be instantiated directly. Instead, use glsp::call to invoke a GFn for which GFn::yields returns true.

To resume a newborn or paused coroutine, use glsp::coro_run.

Coroutines are always stored on the garbage-collected heap, so they're normally represented by the type Root<Coro>.


impl Coro[src]

pub fn gfn(&self) -> Root<GFn>

Notable traits for Root<GIter>

impl Iterator for Root<GIter> type Item = Result<Val, GError>;

Returns the GFn from which this coroutine originated.

pub fn state(&self) -> CoroState[src]

Returns the coroutine's current state.

Equivalent to (coro-state co).

Trait Implementations

impl Debug for Coro[src]

impl Display for Coro[src]

Auto Trait Implementations

impl !RefUnwindSafe for Coro[src]

impl !Send for Coro[src]

impl !Sync for Coro[src]

impl Unpin for Coro[src]

impl !UnwindSafe for Coro[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> Erased for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> IntoElement<Slot> for T where
    T: IntoVal

impl<T> IntoVal for T where
    T: StaticMarker, 

impl<T> ToString for T where
    T: Display + ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.