macro_rules! zp_write_indexed {
($collection_ptr:expr, $index:expr, $value:expr) => { ... };
}Expand description
Write a value to a specific index in a collection via raw pointer
This macro eliminates explicit unsafe blocks when writing to indexed collections.
ยงExamples
use zero_pool::{zp_write_indexed, zp_define_task_fn};
struct BatchTaskStruct { index: usize, results: *mut Vec<u64> }
zp_define_task_fn!(batch_task, BatchTaskStruct, |params| {
let sum = 42u64;
zp_write_indexed!(params.results, params.index, sum);
});