[−][src]Struct glsp_engine::Coro
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>ⓘ
[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
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]
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Erased for 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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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.
pub 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>,