pub struct ThreadScope { /* private fields */ }
Expand description

Additional metadata and state for a specific thread.

You can think of a ThreadScope as a handle a thread has on itself. Each ThreadScope is an interface to advanced theard API below.

Implementations

Report the current thread activity.

This information will become accessible from the introspection API. The main use case is to aid application end users monitor, debug, and understand complex software they use and operate but not implement.

Clear any previously reported activity.

Report the given activity for the duration of a scope.

The scope is considered over once the returned ThreadScopeActivityGuard is dropped.

Check if the thread was requested to shutdown.

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.