Skip to main content

Module scope

Module scope 

Available on crate feature std only.
Expand description

Middleware that runs every input in its own child Scope.

The child is made in the scope the input runs in, merged with the layer’s parent if it has one (a new root without either, see enter_scope_with), and is the scope the inner service sees. It is cancelled after max_age, spread by max_age_jitter, and aborted grace later or at hard_max_age. The inner service decides what the graceful phase means for it; at the hard phase its future is dropped.

Structs§

ScopeAborted
The scope of an input was aborted before its service finished.
ScopeLayer
Runs every input in its own child Scope, see the module docs.
ScopeService
The Service made by ScopeLayer.