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 on the ambient supervisor.

The ambient counterpart to SupervisorHandle::worker.

ยงPanics

ChildBuilder::spawn panics if there is no ambient supervisor. See spawn.