This branch adds a new SerBox API to tricky-pipe. A serbox::Sharer is a memory cell that can be used to store a single serializable value, and hand out a type-erased reference that can be used to serialize the value. One Sharer can be used to share multiple type-erased values, but only one at a time.
Sharers may be constructed from heap-allocated orstatically allocated SerBoxes, allowing the user to determine the allocation strategy.
This branch adds a new
SerBox
API totricky-pipe
. Aserbox::Sharer
is a memory cell that can be used to store a single serializable value, and hand out a type-erased reference that can be used to serialize the value. OneSharer
can be used to share multiple type-erased values, but only one at a time.Sharer
s may be constructed from heap-allocated orstatic
ally allocatedSerBox
es, allowing the user to determine the allocation strategy.