Skip to main content

JobBody

Trait JobBody 

Source
pub trait JobBody: Send + Sync {
    // Required method
    fn make(&self) -> Box<dyn FnOnce() + Send + 'static>;
}
Expand description

A factory for a supervised-job body. Each call produces a fresh unit of work the host’s generic supervisor runs over the batpak::store::Spawn seam.

Required Methods§

Source

fn make(&self) -> Box<dyn FnOnce() + Send + 'static>

Produce one fresh body to spawn.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<F> JobBody for F
where F: Fn() -> Box<dyn FnOnce() + Send + 'static> + Send + Sync,