Trait employees::Type

source ·
pub trait Type: Sealed {
    const IS_ROOT: bool;
}
Expand description

The type of a runtime.

Runtimes can have two different state that defines their ability to stop the execution of their workers. Particularely, a Root runtime can stop its execution itself by calling the enable_graceful_shutdown() functions. Nested runtimes, on the other hand, can’t do this as their stop condition is inherited by the “parent” runtime.

Required Associated Constants§

source

const IS_ROOT: bool

Is the Runtime root or nested?

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Type for Nested

source§

const IS_ROOT: bool = false

source§

impl Type for Root

source§

const IS_ROOT: bool = true