[−][src]Struct context_coroutine::StackAndTypeSafeTransfer
Holds a stack and a type-safe transfer; suitable for the ultimate owner of a coroutine.
On drop the the closure is killed (if it is active) and the stack is then relinquished.
Methods
impl<S: Sized + Deref<Target = Stack>, C: Coroutine> StackAndTypeSafeTransfer<S, C>[src]
pub fn new(stack: S) -> Self[src]
Creates a new instance.
pub fn start(self, start_arguments: C::StartArguments) -> StartOutcome<S, C>[src]
Starts the coroutine; execution will transfer to the coroutine.
Ownership of start_arguments will also transfer.
Returns the data transferred to us after the resume and a guard object to resume the coroutine again or the final result.
If the coroutine panicked, this panics.
Trait Implementations
impl<S: Sized + Deref<Target = Stack>, C: Coroutine> Drop for StackAndTypeSafeTransfer<S, C>[src]
impl<S: Sized + Deref<Target = Stack>, C: Coroutine> Debug for StackAndTypeSafeTransfer<S, C> where
S: Debug,
C::ResumeArguments: Debug,
C::Yields: Debug,
C::Complete: Debug, [src]
S: Debug,
C::ResumeArguments: Debug,
C::Yields: Debug,
C::Complete: Debug,
Auto Trait Implementations
impl<S, C> Send for StackAndTypeSafeTransfer<S, C> where
S: Send,
<C as Coroutine>::Complete: Send,
<C as Coroutine>::ResumeArguments: Send,
<C as Coroutine>::Yields: Send,
S: Send,
<C as Coroutine>::Complete: Send,
<C as Coroutine>::ResumeArguments: Send,
<C as Coroutine>::Yields: Send,
impl<S, C> !Sync for StackAndTypeSafeTransfer<S, C>
Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> From for T[src]
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from)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> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,