Skip to main content

worker

Function worker 

Source
pub fn worker<N, Fut>(name: N, fut: Fut) -> ChildBuilder<'static>
where N: Into<String>, Fut: Future + Send + 'static, Fut::Output: IntoWorkerResult,
Expand description

Creates a builder for a child task of the current process.

The ambient counterpart to SupervisorHandle::worker.

ยงPanics

ChildBuilder::spawn panics if it is called outside supervision. See spawn.