pub struct AsyncGlobal;
Available on crate feature async_global only.
Expand description

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

It works on Wasm.

Implementations

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

Available on non-target_os="unknown" only.

Wrapper around async_global_executor::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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Spawns a future that will be run to completion. Read more

Determines whether the executor is able to spawn new tasks. Read more

Spawn a future and return a JoinHandle that can be awaited for the output of the future.

Spawns a future that will be run to completion. Read more

Determines whether the executor is able to spawn new tasks. Read more

Runs the provided closure on a thread where blocking is acceptable.

Runs the provided closure on a thread where blocking is acceptable. This part of the trait is object safe but your closure must be boxed and you cannot have a return value. Read more

Spawn a future and return a JoinHandle that can be awaited for the output of the future.

Future that resolves after a given duration.

Await this future in order to yield to the executor.

Signal io can be used on this executor.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Spawns a task that polls the given future with output () to completion. Read more

Spawns a task that polls the given future to completion and returns a future that resolves to the spawned future’s output. Read more

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Spawns a task that polls the given future with output () to completion. Read more

Spawns a task that polls the given future to completion and returns a future that resolves to the spawned future’s output. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

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

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more