Macro make_payloads

Source
macro_rules! make_payloads {
    ( $( $a:expr ),* ) => { ... };
}
Expand description

A macro to quickly create an array of payload. This is usefull for running a task with payloads of different types.

use node_workers::{EmptyPayload, WorkerPool, AsPayload, make_payloads};

let mut pool = WorkerPool::setup("examples/worker", 1);
let payloads = make_payloads!(EmptyPayload::new(), 20, "test");
pool.perform::<(), _>("ping", payloads)?;