Trait TaskTrait

Source
pub trait TaskTrait<Arg, Message, Output> {
    // Required method
    fn begin(
        arg: Arg,
        message_receiver: Receiver<Message>,
        interface: TaskInterface<Output>,
    );
}
Expand description

To use a task forge you should implement this trait to your tasks.

Required Methods§

Source

fn begin( arg: Arg, message_receiver: Receiver<Message>, interface: TaskInterface<Output>, )

The begin method takes in parameter an arg of any type that you can pass to your task, a receiver able to receive some message from the pool, and the task interface

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§