[][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>.

Implementations

impl Coro[src]

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

Notable traits for Root<GIter>

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

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
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Erased for T

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoElement<Slot> for T where
    T: IntoVal
[src]

impl<T> IntoVal for T where
    T: StaticMarker, 
[src]

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.