Skip to main content

shutdown_after_children

Function shutdown_after_children 

Source
pub fn shutdown_after_children<B>(
    application: B,
) -> ChildShutdownPhases<B, ChildOccurrences<<<B as Behavior>::Birth as BirthMode>::Child, AvailableChildren>, NoPhases>
where B: Behavior, <B::Birth as BirthMode>::Child: ChildOccurrenceProduct<AvailableChildren>,
Expand description

Start declaring shutdown phases for every direct child role of application.

Each call to ChildShutdownPhases::shutdown_phase consumes one declared role from the available child product. ChildShutdownPhases::finish is therefore available only after every direct child appears exactly once.