[][src]Struct async_executors::AsyncStd

pub struct AsyncStd;
This is supported on feature="async_std" only.

An executor that spawns tasks on async-std. In contrast to the other executors, this one is not self contained, because async-std does not provide an API that allows that, so the threadpool is global.

It works on Wasm.

Implementations

impl AsyncStd[src]

pub fn new() -> Self[src]

Create a new AsyncStd wrapper, forwards to Default::default.

pub fn block_on<F: Future>(future: F) -> F::Output[src]

This is supported on non-target_os="unknown" only.

Wrapper around async_std::task::block_on. This is not available on Wasm as Wasm does not have threads and you're not allowed to block the only thread you have.

Trait Implementations

impl Clone for AsyncStd[src]

impl Copy for AsyncStd[src]

impl Debug for AsyncStd[src]

impl Default for AsyncStd[src]

impl LocalSpawn for AsyncStd[src]

impl<Out: 'static> LocalSpawnHandle<Out> for AsyncStd[src]

impl Spawn for AsyncStd[src]

impl<Out: 'static + Send> SpawnHandle<Out> for AsyncStd[src]

Auto Trait Implementations

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

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

impl<Sp> LocalSpawnExt for Sp where
    Sp: LocalSpawn + ?Sized
[src]

impl<Sp> SpawnExt for Sp where
    Sp: Spawn + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

impl<T> WithSubscriber for T[src]