Macro moveit::slot [−][src]
macro_rules! slot { ($($name:ident $(: $ty:ty)?),*) => { ... }; }
Constructs a new Slot
.
Because Slot
s need to own data on the stack, but that data cannot
move with the Slot
, it must be constructed using this macro. For
example:
moveit::slot!(x, y: bool); let x = x.put(5); let y = y.put(false);
This macro is especially useful for passing data into functions that want to emplace a value into the caller.