pub struct Scope<'scope, T> { /* private fields */ }
Expand description

A TaskPool scope for running one or more non-'static futures.

For more information, see TaskPool::scope.

Implementations

Spawns a scoped future onto the thread pool. The scope must outlive the provided future. The results of the future will be returned as a part of TaskPool::scope’s return value.

If the provided future is non-Send, Scope::spawn_local should be used instead.

For more information, see TaskPool::scope.

Spawns a scoped future onto the thread-local executor. The scope must outlive the provided future. The results of the future will be returned as a part of TaskPool::scope’s return value. Users should generally prefer to use Scope::spawn instead, unless the provided future is not Send.

For more information, see TaskPool::scope.

Trait Implementations

Formats the value using the given formatter. Read more

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.

Calls U::from(self).

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

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.