Skip to main content

nested

Function nested 

Source
pub fn nested<N: Into<String>>(name: N) -> ScopeGuard
Expand description

Creates a scope that a value owns instead of a process.

The children of the scope run under the current process. The supervision tree shows them below that process, under name. They stop when the returned guard is dropped or when the current process stops, whichever occurs first. In both cases, nothing restarts them. If the current process stops before the scope can start, the scope closes at once, and its children never run.

ยงPanics

Panics if there is no current scope. This means that the caller does not run in a supervised process. Use nested_or_detached for code that can run outside supervision.