Skip to main content

Job

Type Alias Job 

Source
pub type Job = Box<dyn FnOnce(&mut World) + Send + 'static>;
Expand description

A unit of work for a world: a boxed closure that runs against it.

A job answers nothing: the queue is one way, and a value the caller wants back travels as state, published by the world that made it and read on the caller’s own tick. A Pending is that round trip: one job per request, and the key its answer comes back under.

Aliased Type§

pub struct Job(/* private fields */);