[][src]Struct context_coroutine::StartedStackAndTypeSafeTransfer

pub struct StartedStackAndTypeSafeTransfer<S: Sized + Deref<Target = Stack>, C: Coroutine> { /* fields omitted */ }

Holds a stack and a type-safe transfer of a started coroutine; suitable for the ultimate owner of a coroutine.

On drop the the closure is killed and the stack is then relinquished.

Methods

impl<S: Sized + Deref<Target = Stack>, C: Coroutine> StartedStackAndTypeSafeTransfer<S, C>[src]

pub fn resume(&mut self, arguments: C::ResumeArguments) -> ResumeOutcome<C>[src]

Resumes.

Returns the data transferred to us after the resume (Left) or the final result (Right).

If the coroutine panicked, this panics.

pub fn resume_on_top_drop_safe(
    &mut self,
    arguments: C::ResumeArguments,
    resume_on_top_function: ResumeOnTopFunction
) -> ResumeOutcome<C>
[src]

Resumes on top.

Returns the data transferred to us after the resume.

If the coroutine panicked, this panics.

Trait Implementations

impl<S: Sized + Deref<Target = Stack>, C: Coroutine> Debug for StartedStackAndTypeSafeTransfer<S, C> where
    S: Debug,
    C::ResumeArguments: Debug,
    C::Yields: Debug,
    C::Complete: Debug
[src]

Auto Trait Implementations

impl<S, C> Send for StartedStackAndTypeSafeTransfer<S, C> where
    S: Send,
    <C as Coroutine>::Complete: Send,
    <C as Coroutine>::ResumeArguments: Send,
    <C as Coroutine>::Yields: Send

impl<S, C> !Sync for StartedStackAndTypeSafeTransfer<S, C>

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.