[][src]Struct async_wormhole::AsyncWormhole

pub struct AsyncWormhole<'a, Stack: Stack, Output, TLS: 'static> { /* fields omitted */ }

Implementations

impl<'a, Stack: Stack, Output, TLS> AsyncWormhole<'a, Stack, Output, TLS>[src]

pub fn new<F>(stack: Stack, f: F) -> Result<Self, Error> where
    F: FnOnce(AsyncYielder<'_, Output>) -> Output + 'a, 
[src]

Takes a stack and a closure and returns an impl Future that can be awaited on.

pub fn preserve_tls(&mut self, tls: &'static LocalKey<Cell<*const TLS>>)[src]

Takes a reference to the to be preserved TLS variable.

pub fn stack(self) -> Stack[src]

Get the stack from the internal generator.

Trait Implementations

impl<'a, Stack: Stack + Unpin, Output, TLS: Unpin> Future for AsyncWormhole<'a, Stack, Output, TLS>[src]

type Output = Option<Output>

The type of value produced on completion.

impl<Stack: Stack, Output, TLS, '_> Send for AsyncWormhole<'_, Stack, Output, TLS>[src]

Auto Trait Implementations

impl<'a, Stack, Output, TLS> !RefUnwindSafe for AsyncWormhole<'a, Stack, Output, TLS>

impl<'a, Stack, Output, TLS> !Sync for AsyncWormhole<'a, Stack, Output, TLS>

impl<'a, Stack, Output, TLS> Unpin for AsyncWormhole<'a, Stack, Output, TLS> where
    Stack: Unpin

impl<'a, Stack, Output, TLS> UnwindSafe for AsyncWormhole<'a, Stack, Output, TLS> where
    Output: RefUnwindSafe,
    Stack: UnwindSafe,
    TLS: RefUnwindSafe

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> From<T> for T[src]

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

impl<F> IntoFuture for F where
    F: Future
[src]

type Output = <F as Future>::Output

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

The output that the future will produce on completion.

type Future = F

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

Which kind of future are we turning this into?

impl<T> Pointable for T

type Init = T

The type for initializers.

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.