pub fn nested_or_detached<N: Into<String>>(name: N) -> ScopeGuardExpand description
Creates a scope that a value owns, as nested does, or a detached guard that acts as a scope outside supervision.
Outside a supervised process, there is no scope to nest in. Thus, the returned guard runs its children as detached tasks instead. When the guard is dropped, it tells these tasks to stop. This is the behavior that this work has without scopes. For this reason, this function is the correct choice for primitives that code can construct anywhere.