macro_rules! mk_slots { ( $($var_name:ident),+ $(,)? ) => { ... }; }
Expand description
Convenience macro to batch-create multiple Slot
s.
mk_slots!(foo, bar, baz);
is a shorthand for multiple mk_slot()
calls:
let foo = &mut mk_slot();
let bar = &mut mk_slot();
let baz = &mut mk_slot();
A so-created &mut Slot<T>
is then to be used to derive a
StackBox
<'slot, T>
out of it, by feeding a value to the slot:
-
either by using
StackBox::new_in()
, -
or the equivalent
.stackbox()
convenience method onSlot
s.