pub struct Scope<'env> { /* private fields */ }
Expand description

A scope for spawning threads.

Implementations§

Create a scoped thread.

spawn is similar to the spawn function in Rust’s standard library. The difference is that this thread is scoped, meaning that it’s guaranteed to terminate before the current stack frame goes away, allowing you to reference the parent stack frame directly. This is ensured by having the parent thread join on the child thread before the scope exits.

Generates the base configuration for spawning a scoped thread, from which configuration methods can be chained.

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.